Displaying 20 results from an estimated 61 matches for "cfi_def_cfa_regist".
Did you mean:
cfi_def_cfa_register
2019 Feb 05
2
clang emits calls to consexpr function.
...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
addq $16, %rsp
popq %rbp
.cfi_def_cfa %rsp...
2012 Mar 02
3
[LLVMdev] how to annotate assembler
...sed 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 into config/i386/i386.md, and lo...
2012 May 24
4
[LLVMdev] use AVX automatically if present
....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_endproc
.section ".note.GNU-stack","", a...
2012 Mar 02
0
[LLVMdev] how to annotate assembler
...t;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 MOV64mr
## <MCOperand Reg:106>
## <MCOperand Imm:1>
## <MCOperand Reg:0>...
2018 Sep 14
2
Function calls keep increasing the stack usage
...mmand 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) # 4-byte Spill
> callq foo
> movl %eax, -8(%...
2019 Aug 08
2
Suboptimal code generated by clang+llc in quite a common scenario (?)
...re 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
retl
.cfi_endproc
.comm _pp,3,0
.section...
2009 Aug 18
0
[LLVMdev] Build issues on Solaris
Hello, Nathan
> or if it should be a configure test, which might be safer. Are there
> any x86 platforms (other than apple) that don't need PLT-indirect calls?
Yes, mingw. However just tweaking the define is not enough - we're not
loading address of GOT into ebx before the call (on 32 bit ABIs) thus
the call will be to nowhere.
--
With best regards, Anton Korobeynikov
Faculty of
2012 May 24
0
[LLVMdev] use AVX automatically if present
...: # @_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_endproc
>
>
> .section &qu...
2013 Sep 05
2
[LLVMdev] CFI Directives
...g 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:
.cfi_offset %r15, -24
I need to be able to know that `%rsp' was adjuste...
2018 Apr 12
3
[RFC] __builtin_constant_p() Improvements
...%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
movl $927, -12(%rbp) # imm = 0x39F
.LBB0_...
2012 Jul 29
3
[LLVMdev] rotate
...t; .section __TEXT,__text,regular,pure_instructions
> .globl _rotr
> _rotr: ## @rotr
> .cfi_startproc
> ## BB#0:
> pushq %rbp
> Ltmp2:
> .cfi_def_cfa_offset 16
> Ltmp3:
> .cfi_offset %rbp, -16
> movq %rsp, %rbp
> Ltmp4:
> .cfi_def_cfa_register %rbp
> movb %sil, %cl
> rorl %cl, %edi<==== Rotate instruction
> movl %edi, %eax
> popq %rbp
> ret
> .cfi_endproc
> .subsections_via_symbols
> ======
>
> I hope this helps.
>
> Michael
>
> On Jul 28, 2012, at 8:29 PM, reed kotler<rkotler at mi...
2009 Aug 25
2
[LLVMdev] Build issues on Solaris
...ck)
ASMPREFIX "X86CompilationCallback:\n"
CFI(".cfi_startproc\n")
"pushl %ebp\n"
+ CFI(".cfi_def_cfa_offset 12\n")
+ CFI(".cfi_offset %ebp, -12\n")
+ "movl %esp, %ebp\n" // Standard prologue
+ CFI(".cfi_def_cfa_register %ebp\n")
+ "pushl %eax\n"
+ CFI(".cfi_rel_offset %eax, 0\n")
+ "pushl %edx\n" // Save EAX/EDX/ECX
+ CFI(".cfi_rel_offset %edx, 4\n")
+ "pushl %ecx\n"
+ CFI(".cfi_rel_offset %ecx, 8\n")
+ "pus...
2017 Aug 21
3
DragonEgg for GCC v8.x and LLVM v6.x is just able to work
....p2align 4, 0x90
.type foo, at function
foo: # @foo
.cfi_startproc
# BB#0: # %entry
pushq %rbp
.Ltmp0:
.cfi_def_cfa_offset 16
.Ltmp1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
.Ltmp2:
.cfi_def_cfa_register %rbp
movl $.L.cst, %edi
movl $.L.cst.1, %esi
movl $4, %edx
movl $__func__.2210, %ecx
xorl %eax, %eax
callq printf
popq %rbp
retq
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
.cfi_endproc
.globl main
.p2align 4,...
2015 Jan 23
2
[LLVMdev] X86TarIgetLowering::LowerToBT
> icc generates testq for 0-30 and btq for 31-63.
> That seems like a small bug in the bit 31 case.
You can’t use testq for bit 31, because the immediate gets sign-extended. You *can* use the 32b form, of course.
2012 Jul 29
0
[LLVMdev] rotate
...-c -S -Os -o -
======
yielding an assembly output of:
======
.section __TEXT,__text,regular,pure_instructions
.globl _rotr
_rotr: ## @rotr
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
movb %sil, %cl
rorl %cl, %edi <==== Rotate instruction
movl %edi, %eax
popq %rbp
ret
.cfi_endproc
.subsections_via_symbols
======
I hope this helps.
Michael
On Jul 28, 2012, at 8:29 PM, reed kotler <rkotler at mips.com> wrote:
> in C or C++,...
2013 Jul 10
4
[LLVMdev] unaligned AVX store gets split into two instructions
...l creates:
.section __TEXT,__text,regular,pure_instructions
.globl _vstore
.align 4, 0x90
_vstore: ## @vstore
.cfi_startproc
## BB#0: ## %entry
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
vmovups (%rdi), %ymm0
popq %rbp
ret
.cfi_endproc
----------------------------------------------------------------
Running llvm-33/bin/llc vstore.ll creates:
.section __TEXT,__text,regular,pure_instructions
.globl _main
.align 4, 0x90
_main:...
2012 Jul 29
2
[LLVMdev] rotate
in C or C++, how can I get clang/llvm to try and do a "rotate".
(want to test this code in the mips16 port)
i.e. emit rotr node.
tia.
reed
2013 Sep 05
1
[LLVMdev] AVX calling convention?
...sses the argument on the stack. The callee, however, begins with
__Z14convert_char16Dv16_s: ## @_Z14convert_char16Dv16_s
.cfi_startproc
## BB#0: ## %entry
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
vextractf128 $1, %ymm0, %xmm1
which expects the argument in %ymm0. However, the vzeroupper in the caller just destroyed part of %ymm0...
My question is:
What decides this calling convention? I know that standard x86-64 should pass arguments in %xmm0, not %ymm0. Are there e.g. command lin...
2013 Sep 06
0
[LLVMdev] CFI Directives
...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:
> .cfi_offset %r15, -24
>...
2012 Jul 29
0
[LLVMdev] rotate
...n intel shifts are mod the register size:
=====
.section __TEXT,__text,regular,pure_instructions
.globl _ror
.align 4, 0x90
_ror: ## @ror
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movq %rsi, -16(%rbp)
movl -4(%rbp), %edi
movq -16(%rbp), %rsi
movl %esi, %eax
movl %eax, %ecx
## kill: CL<def> ECX<kill>
shrl %cl, %edi
movl -4(%rbp), %eax
movabsq $32, %rsi
subq -16(%rbp), %rsi
movl %esi, %ed...