search for: globl

Displaying 20 results from an estimated 599 matches for "globl".

Did you mean: global
2013 Aug 26
5
[RFC PATCH 0/2] GLOBAL() macro for asm code.
Hello, This series has been split into two patches, one for arm and one for x86. I figured that this was easier than doing it as a single combined patch, especially as the changes are functionally independent. x86 has been boot tested, but arm has not even been compile tested as I lack a suitable cross compiler. However, the changes are just text replacement, so I dont expect any issues. The
2013 Aug 29
2
[LLVMdev] .globl
I need to be able to emit .globl for the soft float routines used by mips16. The routines are called but there is no .globl definition for them. How can I do this? Background: I have a strange issue that I encountered with mips16 hard float. Part of mips16 hard float is to emit calls to runtime routines with the same signatur...
2013 Dec 03
0
[klibc:master] ppc64: Add ppc64le support
...t a/usr/klibc/arch/ppc64/crt0.S b/usr/klibc/arch/ppc64/crt0.S index c976d5c..ed14534 100644 --- a/usr/klibc/arch/ppc64/crt0.S +++ b/usr/klibc/arch/ppc64/crt0.S @@ -9,25 +9,35 @@ # } # - .section ".toc","aw" -.LC0: .tc environ[TC],environ - .text - .align 4 - + .balign 4 + .globl _start +#if _CALL_ELF == 2 + .type _start, at function +_start: +#else .section ".opd","aw" + .balign 8 _start: .quad ._start, .TOC. at tocbase, 0 .previous - .size _start, 24 .type ._start, at function - .globl _start - .globl ._start ._start: - stdu %r1,-32(%r1) -...
2013 Sep 02
0
[LLVMdev] .globl
...s no hardware floating point > instructions). > > These routines have the same names as the corresponding softfloat > routines, except with the additional prefix __mips16_ . So for example, > __mips16_floatsidf. > > For these intrinsics, (and not others), gcc mips16 emits a .globl. > > Without this .globl ( which llvm does not emit), then the program will > run very slow if compiled in -fPIC and linked as C++. It seems to be > stuck in the loader (probably doing dynamic binding over and over again). This might or might not be related, but I notice that for the...
2013 Dec 03
2
[PATCH 1/2] ppc64: Add ppc64le support
...t a/usr/klibc/arch/ppc64/crt0.S b/usr/klibc/arch/ppc64/crt0.S index c976d5c..250a84a 100644 --- a/usr/klibc/arch/ppc64/crt0.S +++ b/usr/klibc/arch/ppc64/crt0.S @@ -9,25 +9,35 @@ # } # - .section ".toc","aw" -.LC0: .tc environ[TC],environ - .text - .align 4 - + .balign 4 + .globl _start +#if _CALL_ELF == 2 + .type _start, at function +_start: +#else .section ".opd","aw" + .balign 8 _start: .quad ._start, .TOC. at tocbase, 0 .previous - .size _start, 24 .type ._start, at function - .globl _start - .globl ._start ._start: - stdu %r1,-32(%r1) -...
2004 Feb 22
3
ARM/Thumb updates and some other minor tweaks
...c/arch/arm/crt0.S --- klibc-0.114_orig/klibc/arch/arm/crt0.S 2002-08-23 16:11:01.000000000 -0700 +++ klibc-0.114/klibc/arch/arm/crt0.S 2004-02-22 04:39:00.000000000 -0800 @@ -10,7 +10,7 @@ # .text - .align 4 + .align 2 @ For ARM, align means align on a 2^n boundary .type _start,#function .globl _start diff -ruN klibc-0.114_orig/klibc/arch/arm/setjmp-arm.S klibc-0.114/klibc/arch/arm/setjmp-arm.S --- klibc-0.114_orig/klibc/arch/arm/setjmp-arm.S 2002-08-21 07:12:10.000000000 -0700 +++ klibc-0.114/klibc/arch/arm/setjmp-arm.S 2004-02-22 04:39:00.000000000 -0800 @@ -1,5 +1,5 @@ # -# arch/arm...
2012 Feb 15
2
[LLVMdev] ASM appears to be incorrect from llc
...et i32 0 } Now, I know no memory is allocated for t (ignore that), we'll just expect the final program to crash Running this through llvm-as.exe test.trunk.ll -f -o test.bc and then llc -x86-asm-syntax=intel -o test.trunk.S test.bc yields: .def _main__i__v; .scl 2; .type 32; .endef .text .globl _main__i__v .align 16, 0x90 _main__i__v: # @main__i__v # BB#0: # %locals sub ESP, 20 movss XMM0, DWORD PTR [_t] movss DWORD PTR [ESP + 8], XMM0 fld DWORD PTR [ESP + 8] fisttp QWORD PTR [ESP] mov EAX, DWORD PTR [ESP] mov _x, EAX xor EAX, EAX...
2018 Sep 20
3
Comparing Clang and GCC: only clang stores updated value in each iteration.
...le gcc instead figures out the value a has after the loop (0) and stores it then once to 'a'. /Jonas int a = 1; void b() {   do     if (a)       a++;   while (a != 0); } bin/clang -O3 -march=z13 -mllvm -unroll-count=1         .text         .file   "testfun.i"         .globl  b                       # -- Begin function b         .p2align        4         .type   b, at function b:                                      # @b # %bb.0:                                # %entry         lrl     %r0, a .LBB0_1:                                # %do.body                        ...
2006 Apr 29
2
[LLVMdev] Intel vs. AT&T Assembly.
...e AT&T version at this time. > No one has yet taken the time to make it produce actual Intel syntax. It's a long way towards it: # AT&T. # Intel. .text .text .align 16 .align 16 .globl main .globl main .type main, @function main: main: subl $12, %esp sub esp, 12 fnstcw 10(%esp) fnstcw word ptr [esp + 10] movb $2, 11(%esp)...
2012 Jan 04
1
[LLVMdev] How can I compile a c source file to use SSE2 Data Movement Instructions?
...gth 80 -mstackrealign -fms-extension -fms-compatibility -fmsc-version=1300 -fdelayed-template-parsing -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics show-option -fcolor-diagnostics -o test.s -x c test.c .def _f; .scl 2; .type 32; .endef .text .globl _f .align 16, 0x90 _f: # @f # BB#0: movl $-800, %eax # imm = 0xFFFFFFFFFFFFFCE0 movsd _DA, %xmm0 .align 16, 0x90 LBB0_1: # =>This Inner Loop Header: Depth=1 movsd _X+800(%eax), %xmm1 mulsd %xmm0, %xmm1 movsd _...
2014 Jan 31
5
[LLVMdev] emitting function stub for mips16 floating point patch
I'm rewriting this patch for the stubs to not use outputing of raw text. Generating the instructions is very straightforward and that part is done. I'm translating the actual function now. How do you emit an .ent or .globl from asm printer? .type ? .end ?? .section ??? I'm studying the classes now but it should be simple to do so if you know, you can save me some time because this is another maze of llvm data abstraction. Tia. Reed void MipsAsmPrinter::EmitFPCallStub( const char* Symbol, const Mips16...
2019 Aug 08
2
Suboptimal code generated by clang+llc in quite a common scenario (?)
...%2 = load i8*, i8** @scscx, align 8, !tbaa !11 %arrayidx2 = getelementptr inbounds i8, i8* %2, i64 2 store i8 %k, i8* %arrayidx2, align 1, !tbaa !13 ret i32 0 } According to that, the variable ‘scscx’ is loaded three times despite it’s never modified. The resulting assembly code is this: .globl _tst _tst: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset %ebp, -8 movl %esp, %ebp .cfi_def_cfa_register %ebp pushl %esi .cfi_offset %esi, -12 movb 16(%ebp), %al movb 12(%ebp), %cl movb 8(%ebp), %dl movl _scscx, %esi movb %dl, (%esi) movl _scscx, %edx movb %cl, 1(%edx)...
2006 Jun 26
0
[klibc 22/43] arm support for klibc
...+ v = (uint64_t)al * bl; + v += (uint64_t)(al*bh+ah*bl) << 32; + + return v; +} diff --git a/usr/klibc/arch/arm/aeabi_nonsense.S b/usr/klibc/arch/arm/aeabi_nonsense.S new file mode 100644 index 0000000..c69eb11 --- /dev/null +++ b/usr/klibc/arch/arm/aeabi_nonsense.S @@ -0,0 +1,9 @@ + .text + .globl __aeabi_unwind_cpp_pr0 +__aeabi_unwind_cpp_pr0: + .globl __aeabi_unwind_cpp_pr1 +__aeabi_unwind_cpp_pr1: + .globl __aeabi_unwind_cpp_pr2 +__aeabi_unwind_cpp_pr2: + .globl __aeabi_unwind_cpp_pr3 +__aeabi_unwind_cpp_pr3: diff --git a/usr/klibc/arch/arm/crt0.S b/usr/klibc/arch/arm/crt0.S new file mode...
2012 Feb 16
0
[LLVMdev] ASM appears to be incorrect from llc
...'ll just expect > the final program to crash > > Running this through > llvm-as.exe test.trunk.ll -f -o test.bc > and then > llc -x86-asm-syntax=intel -o test.trunk.S test.bc > > yields: > > .def _main__i__v; > .scl 2; > .type 32; > .endef > .text > .globl _main__i__v > .align 16, 0x90 > _main__i__v:                            # @main__i__v > # BB#0:                                 # %locals > sub ESP, 20 > movss XMM0, DWORD PTR [_t] > movss DWORD PTR [ESP + 8], XMM0 > fld DWORD PTR [ESP + 8] > fisttp QWORD PTR [ESP] > mov...
2006 Jun 26
0
[klibc 24/43] i386 support for klibc
...b/usr/klibc/arch/i386/crt0.S @@ -0,0 +1,31 @@ +# +# arch/i386/crt0.S +# +# Does arch-specific initialization and invokes __libc_init +# with the appropriate arguments. +# +# See __static_init.c or __shared_init.c for the expected +# arguments. +# + + .text + .align 4 + .type _start, at function + .globl _start +_start: + # Save the address of the ELF argument array + movl %esp,%eax # Address of ELF arguments + # Set up a faux stack frame for the benefit of gdb + xorl %ebp,%ebp + push %ebp # Keep gdb from getting confused + push %ebp # Keep gdb from getting confused + # Push the arguments and ca...
2017 Mar 07
4
[BUG Report] -dead_strip, strips prefix data unconditionally on macOS
...unction symbol. All other object formats would just emit the prefix data. Peter On Mon, Mar 6, 2017 at 6:16 PM, Moritz Angermann <moritz.angermann at gmail.com > wrote: > Thank you Peter! > > That seems to do the trick! > > $ cat test.s > .section __TEXT,__text > .globl _main > > .long 1 > _main: > inc %eax > ret > > .alt_entry _main > _main.dsp = _main-4 > > .subsections_via_symbols > > > $ clang test.s -dead_strip > $ otool -vVtdj a.out > a.out: > _main.dsp: > 0000000100000fb1 01 00 addl %e...
2017 Mar 07
2
[BUG Report] -dead_strip, strips prefix data unconditionally on macOS
On Mon, Mar 6, 2017 at 5:54 PM, Moritz Angermann <moritz.angermann at gmail.com > wrote: > Hi Peter, > > I’ve just experimented with this a bit: > > Say we would end up with the following assembly: > > .section __TEXT,__text > .globl _main > > .long 1 > _main: > inc %eax > ret > > .globl _main.dsp > .alt_entry _main.dsp > What happens if you try ".alt_entry _main" instead? The alt_entry is supposed to be bound to the atom appearing *before* it. > _main.dsp = _main-4 &gt...
2012 May 24
4
[LLVMdev] use AVX automatically if present
...;8 x float>*, <8 x float>*) { _L1: %x = load <8 x float>* %0 %y = load <8 x float>* %1 %z = fadd <8 x float> %x, %y store <8 x float> %z, <8 x float>* %0 ret void } $ llc -o - avx.ll .file "avx.ll" .text .globl _fun1 .align 16, 0x90 .type _fun1, at function _fun1: # @_fun1 .cfi_startproc # BB#0: # %_L1 movaps (%rdi), %xmm0 movaps 16(%rdi), %xmm1 addps (%rsi), %xmm0 addps...
2014 May 11
2
[LLVMdev] [cfe-dev] Code generation for noexcept functions
...t; using FP = void(*)(); > > inline void test(FP fp) noexcept { > fp(); > } > > void test2(FP fp) { > test(fp); > test(fp); > } > > The code generated by GCC (ToT, -O3, Linux x64) is: > > .LHOTB0: > .p2align 4,,15 > .globl _Z5test2PFvvE > .type _Z5test2PFvvE, @function > _Z5test2PFvvE: > .LFB1: > .cfi_startproc > .cfi_personality 0x3,__gxx_personality_v0 > .cfi_lsda 0x3,.LLSDA1 > pushq %rbx > .cfi_def_cfa_offset 16 > .cfi_offset 3...
2012 Feb 14
3
[LLVMdev] LLVM GHC Backend: Tables Next To Code
...e layout of Heap objects in GHC: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/Storage/HeapObjects#InfoTables With TNTC enabled we generate code for closures of this form: .text .align 8 .long Main_main1_srt-(Main_main1_info)+0 .long 0 .quad 4294967299 .quad 0 .quad 270582939663 .globl Main_main1_info .type Main_main1_info, @object Main_main1_info: .Lc1Df: leaq -8(%rbp),%rax cmpq %r15,%rax jb .Lc1Dh [...] .data .globl Main_main1_closure .type Main_main1_closure, @object Main_main1_closure: .quad Main_main1_info .quad 0 Without TNTC we instead generated code of this form:...