Displaying 20 results from an estimated 88 matches for "cfi_offset".
2013 Sep 05
2
[LLVMdev] CFI Directives
...ives. I *think* that this should be doable. The issue I'm facing right now is that I need to know how much the stack pointer was adjusted. So when I have something like this:
.cfi_startproc
Lfunc_begin175:
pushq %rbp
Ltmp1532:
.cfi_def_cfa_offset 16
Ltmp1533:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp1534:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $3224, %rsp ## imm = 0xC98
Ltmp1535:
.cfi_offset %rbx, -40
Ltmp1536:
.cfi_offset %r14, -32
Ltmp1537:
....
2013 Sep 06
0
[LLVMdev] CFI Directives
...ble. The issue I'm facing right now is that I need to know how much the stack pointer was adjusted. So when I have something like this:
>
> .cfi_startproc
> Lfunc_begin175:
> pushq %rbp
> Ltmp1532:
> .cfi_def_cfa_offset 16
> Ltmp1533:
> .cfi_offset %rbp, -16
> movq %rsp, %rbp
> Ltmp1534:
> .cfi_def_cfa_register %rbp
> pushq %r15
> pushq %r14
> pushq %rbx
> subq $3224, %rsp ## imm = 0xC98
> Ltmp1535:
> .cfi_offset %rbx, -40
> Ltmp1536:...
2013 Sep 02
0
[LLVMdev] .globl
..._gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -32
$tmp2:
.cfi_def_cfa_offset 32
sw $ra, 28($sp) # 4-byte Folded Spill
sw $18, 24($sp) # 4-byte Folded Spill
sw $17, 20($sp) # 4-byte Folded Spill
sw $16, 16($sp) # 4-byte Folded Spill
$tmp3:
.cfi_offset 31, -4
$tmp4:
.cfi_offset 18, -8
$tmp5:
.cfi_offset 17, -12
$tmp6:
.cfi_offset 16, -16
addu $16, $2, $25
move $17, $4
lw $18, %call16(foo)($16)
$BB0_1: # %loop
# =>This Inner Loop Header: Depth=1
move $25, $18
jalr $...
2019 Aug 08
2
Suboptimal code generated by clang+llc in quite a common scenario (?)
...entptr 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)
movl _scscx, %ecx
movb %al, 2(%ecx)
xorl %eax, %eax
popl %esi
popl %ebp...
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 signature as usual soft float routines, except that they are
implemented
2019 Feb 05
2
clang emits calls to consexpr function.
...roduct()
{
return 10*20;
}
int main()
{
const int x = product();
return 0;
}
$./clang test.cpp -std=c++11 -S
$./clang -v
clang version 9.0.0
Target: x86_64-unknown-linux-gnu
$cat test.s
main:
.cfi_startproc
# %bb.0:
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $16, %rsp
movl $0, -4(%rbp)
callq _Z7productv //here you can see the calls to product
function
xorl %ecx, %ecx
movl %eax, -8(%rbp)
movl %ecx, %eax...
2012 Mar 28
2
[LLVMdev] Suboptimal code due to excessive spilling
...=
======================
foo: # @foo
.Ltmp12:
.cfi_startproc
# BB#0:
pushl %ebx
.Ltmp13:
.cfi_def_cfa_offset 8
pushl %edi
.Ltmp14:
.cfi_def_cfa_offset 12
pushl %esi
.Ltmp15:
.cfi_def_cfa_offset 16
subl $88, %esp
.Ltmp16:
.cfi_def_cfa_offset 104
.Ltmp17:
.cfi_offset %esi, -16
.Ltmp18:
.cfi_offset %edi, -12
.Ltmp19:
.cfi_offset %ebx, -8
pxor %xmm0, %xmm0
movl 112(%esp), %eax
testl %eax, %eax
je .LBB1_3
# BB#1:
xorl %ebx, %ebx
movl 108(%esp), %ecx
movl 104(%esp), %edx
xorl %esi, %esi
.align 16, 0x90
.LBB1_2: # %.lr.ph.i...
2012 Apr 05
0
[LLVMdev] Suboptimal code due to excessive spilling
...=
======================
foo: # @foo
.Ltmp12:
.cfi_startproc
# BB#0:
pushl %ebx
.Ltmp13:
.cfi_def_cfa_offset 8
pushl %edi
.Ltmp14:
.cfi_def_cfa_offset 12
pushl %esi
.Ltmp15:
.cfi_def_cfa_offset 16
subl $88, %esp
.Ltmp16:
.cfi_def_cfa_offset 104
.Ltmp17:
.cfi_offset %esi, -16
.Ltmp18:
.cfi_offset %edi, -12
.Ltmp19:
.cfi_offset %ebx, -8
pxor %xmm0, %xmm0
movl 112(%esp), %eax
testl %eax, %eax
je .LBB1_3
# BB#1:
xorl %ebx, %ebx
movl 108(%esp), %ecx
movl 104(%esp), %edx
xorl %esi, %esi
.align 16, 0x90
.LBB1_2: # %.lr.ph.i...
2012 Mar 20
0
[LLVMdev] Runtime linker issue wtih X11R6 on i386 with -O3 optimization
...ts
.Lsection_debug_loc:
.text
.Ltext_begin:
.data
.text
.globl moo
.align 16, 0x90
.type moo, at function
moo: # @moo
.Ltmp3:
.cfi_startproc
.Lfunc_begin0:
.loc 1 12 0 # a.c:12:0
# BB#0:
pushl %ebp
.Ltmp4:
.cfi_def_cfa_offset 8
.Ltmp5:
.cfi_offset %ebp, -8
movl %esp, %ebp
.Ltmp6:
.cfi_def_cfa_register %ebp
pushl %ebx
subl $20, %esp
.Ltmp7:
.cfi_offset %ebx, -12
calll .L0$pb
.L0$pb:
popl %eax
.Ltmp8:
addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp8-.L0$pb), %eax
movl 8(%ebp), %ecx
leal .L.str at GOTOFF(%eax), %edx
movl %ecx, -8(%ebp)
.loc 1 13...
2012 Mar 02
3
[LLVMdev] how to annotate assembler
...patterns, that was used when
assembler was generated. For example:
double
test(long long s)
{
return s;
}
gcc -S -dp -O0 test.c
test:
.LFB0:
.cfi_startproc
pushq %rbp # 18 *pushdi2_rex64/1 [length = 1]
.cfi_def_cfa_offset 16
movq %rsp, %rbp # 19 *movdi_1_rex64/2 [length = 3]
.cfi_offset 6, -16
.cfi_def_cfa_register 6
movq %rdi, -8(%rbp) # 2 *movdi_1_rex64/4 [length = 4]
cvtsi2sdq -8(%rbp), %xmm0 # 6 *floatdidf2_sse_interunit/2 [length = 6]
leave # 24 leave_rex64 [length = 1]
.cfi_def_cfa 7, 8
ret # 25 return_internal [length = 1]
.cfi_endproc
Now I may look int...
2012 May 24
4
[LLVMdev] use AVX automatically if present
....text
.globl _fun1
.align 16, 0x90
.type _fun1, at function
_fun1: # @_fun1
.cfi_startproc
# BB#0: # %_L1
pushq %rbp
.Ltmp2:
.cfi_def_cfa_offset 16
.Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp4:
.cfi_def_cfa_register %rbp
vmovaps (%rdi), %ymm0
vaddps (%rsi), %ymm0, %ymm0
vmovaps %ymm0, (%rdi)
popq %rbp
vzeroupper
ret
.Ltmp5:
.size _fun1, .Ltmp5-_fun1
.cfi_end...
2012 Mar 02
0
[LLVMdev] how to annotate assembler
...c-inst -o -
_test: ## @test
.cfi_startproc
## BB#0: ## %entry
pushq %rbp ## <MCInst #2120 PUSH64r
## <MCOperand Reg:106>>
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp ## <MCInst #1491 MOV64rr
## <MCOperand Reg:106>
## <MCOperand Reg:114>>
Ltmp4:
.cfi_def_cfa_register %rbp
movq %rdi, -8(%rbp) ## <MCInst #1482 MO...
2014 May 11
2
[LLVMdev] [cfe-dev] Code generation for noexcept functions
....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, -16
> movq %rdi, %rbx
> call *%rdi
> movq %rbx, %rax
> popq %rbx
> .cfi_def_cfa_offset 8
> jmp *%rax
> .cfi_endproc
> .LFE1:
> .globl __gxx_personality_v0
> .section .gcc...
2018 Sep 14
2
Function calls keep increasing the stack usage
...at target are you compiling for - possibly
> provide the -cc1 command line, etc).
>
> bar: # @bar
> .cfi_startproc
> # %bb.0: # %entry
> pushq %rbp
> .cfi_def_cfa_offset 16
> .cfi_offset %rbp, -16
> movq %rsp, %rbp
> .cfi_def_cfa_register %rbp
> subq $16, %rsp
> movl $1, %edi
> movl $2, %esi
> callq foo
> movl $3, %edi
> movl $4, %esi
> movl %eax, -4(%rbp)...
2016 Jun 30
4
Help required regarding IPRA and Local Function optimization
...lineAsm Start
movl %r14d, %r15d
## InlineAsm End
retq
.cfi_endproc
.globl _bar
.p2align 4, 0x90
_bar: ## @bar
.cfi_startproc
## BB#0:
pushq %r15
Ltmp0:
.cfi_def_cfa_offset 16
pushq %rbx
Ltmp1:
.cfi_def_cfa_offset 24
pushq %rax
Ltmp2:
.cfi_def_cfa_offset 32
Ltmp3:
.cfi_offset %rbx, -24
Ltmp4:
.cfi_offset %r15, -16
## InlineAsm Start
movl %ecx, %r15d
## InlineAsm End
callq _foo
## InlineAsm Start
movl %r15d, %ebx
## InlineAsm End
addq $8, %rsp
popq %rbx
popq %r15
retq
.cfi_endproc
.subsections_via_symbols
now foo clobbers R15 (which is callee saved) but as foo is loca...
2012 May 24
0
[LLVMdev] use AVX automatically if present
...> .align 16, 0x90
> .type _fun1, at function
> _fun1: # @_fun1
> .cfi_startproc
> # BB#0: # %_L1
> pushq %rbp
> .Ltmp2:
> .cfi_def_cfa_offset 16
> .Ltmp3:
> .cfi_offset %rbp, -16
> movq %rsp, %rbp
> .Ltmp4:
> .cfi_def_cfa_register %rbp
> vmovaps (%rdi), %ymm0
> vaddps (%rsi), %ymm0, %ymm0
> vmovaps %ymm0, (%rdi)
> popq %rbp
> vzeroupper
> ret
> .Ltmp5:
> .size...
2017 Jul 01
2
KNL Assembly Code for Matrix Multiplication
...gt;>>>> .cfi_def_cfa_offset 32
>>>>> push r12
>>>>> .Lcfi3:
>>>>> .cfi_def_cfa_offset 40
>>>>> push rbx
>>>>> .Lcfi4:
>>>>> .cfi_def_cfa_offset 48
>>>>> .Lcfi5:
>>>>> .cfi_offset rbx, -48
>>>>> .Lcfi6:
>>>>> .cfi_offset r12, -40
>>>>> .Lcfi7:
>>>>> .cfi_offset r14, -32
>>>>> .Lcfi8:
>>>>> .cfi_offset r15, -24
>>>>> .Lcfi9:
>>>>> .cfi_offset rbp, -16
>&g...
2013 Feb 20
3
[LLVMdev] Is va_arg correct on Mips backend?
...5sum_iiz:
.cfi_startproc
.frame $sp,64,$ra
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# BB#0:
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -64
$tmp2:
.cfi_def_cfa_offset 64
sw $ra, 60($sp) # 4-byte Folded Spill
$tmp3:
.cfi_offset 31, -4
addu $gp, $2, $25
sw $7, 76($sp)
sw $6, 72($sp)
sw $5, 68($sp)
lw $3, %got(__stack_chk_guard)($gp)
lw $1, 0($3)
sw $1, 56($sp)
sw $4, 52($sp)
sw $zero, 48($sp) // i
sw $zero, 44($sp) // val
sw $zero, 40($sp) // sum
addiu $1, $sp, 68
sw $1, 16($sp) // arg_ptr1
sw $zero, 48($sp...
2019 Aug 08
3
Suboptimal code generated by clang+llc in quite a common scenario (?)
...t; > }
> >
> > 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
>...
2018 Apr 12
3
[RFC] __builtin_constant_p() Improvements
...# %entry
testl %edi, %edi
movl $927, %ecx # imm = 0x39F
movl $1, %eax
cmovel %ecx, %eax
retq
And this code at -O0:
bar: # @bar
.cfi_startproc
# %bb.0: # %entry
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
movl %edi, -16(%rbp)
cmpl $0, -16(%rbp)
je .LBB0_2
# %bb.1: # %if.then
movl $42, -8(%rbp)
movl $0, -4(%rbp)
movl -4(%rbp), %eax
movl %eax, -12(%rbp)
jmp .LBB0_3
.LBB0_2: # %if.else
mov...