Displaying 1 result from an estimated 1 matches for "bssloop".
2015 Aug 28
7
Clearing the BSS section
....0rc3) code I had wrote is :
;------------
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv7em-none--eabi"
@__bss_start = external global i32
@__bss_end = external global i32
define void @clearBSS () nounwind {
entry:
br label %bssLoopTest
bssLoopTest:
%p = phi i32* [@__bss_start, %entry], [%p.next, %bssLoop]
%completed = icmp eq i32* %p, @__bss_end
br i1 %completed, label %clearCompleted, label %bssLoop
bssLoop:
store i32 0, i32* %p, align 4
%p.next = getelementptr inbounds i32, i32* %p, i32 1
br label %bssLoopTe...