Displaying 20 results from an estimated 111 matches for "cfi_def_cfa_offset".
2012 Mar 28
2
[LLVMdev] Suboptimal code due to excessive spilling
...for (int i = 0; i != k;++i)
{
s += sum(&x[i], 18);
p[i] = 5; // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
return s;
}
====== Output A ======
======================
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...
2018 Jan 16
2
Exception handling support for a target
...My test case is:
void foo() {
throw 0;
}
void bar() {
try {
foo();
} catch (...) {
throw 0;
}
}
int main() {
try {
bar();
} catch (...) {
return 0; // fail to catch exception thrown by bar
}
return 0;
}
, and the assembly of bar looks like
bar:
.cfi_def_cfa_offset 16
epilogue
_Unwind_Resume
The lookup phase of exception handling is fine. However, something goes
wrong in cleanup phase. The reason is the unwinder evaluates CFI directives
until _Unwind_Resume, and `.cfi_def_cfa_offset 16` is the culprit. I think
this is what you were saying &quo...
2011 Jun 23
1
[LLVMdev] Strange Failure in LLVM Test Suite
...etting the following error on Mac OS X when compiling C++ code in
the LLVM test suite:
g++ Output/minisat.llc.s -o Output/minisat.llc -lm -m64
-fomit-frame-pointer -mdynamic-no-pic -lstdc++ -lm
Output/minisat.llc.s:5:Unknown pseudo-op: .cfi_startproc
Output/minisat.llc.s:8:Unknown pseudo-op: .cfi_def_cfa_offset
Output/minisat.llc.s:8:Rest of line ignored. 1st junk character valued
49 (1).
Output/minisat.llc.s:11:Unknown pseudo-op: .cfi_def_cfa_offset
Output/minisat.llc.s:11:Rest of line ignored. 1st junk character valued
50 (2).
Output/minisat.llc.s:14:Unknown pseudo-op: .cfi_def_cfa_offset
Output/minis...
2011 Aug 01
2
[LLVMdev] llvm 3.0 svn and cfi_* directives
Hi,
Compiling a simple function with the 3.0 SVN branch
llc produces .s output containing cfi_startproc, cfi_endproc,
cfi_def_cfa_offset that gcc refuses to compile
(OS X 10.7 on X86-64) with the following error:
test.s:6:Unknown pseudo-op: .cfi_startproc
test.s:10:Unknown pseudo-op: .cfi_def_cfa_offset
test.s:10:Rest of line ignored. 1st junk character valued 51 (3).
test.s:38:Unknown pseudo-op: .cfi_endproc
The version of gas is...
2018 Jan 16
0
Exception handling support for a target
On 16 January 2018 at 13:41, 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote:
> bar:
>
> .cfi_def_cfa_offset 16
> epilogue
>
> _Unwind_Resume
>
>
>
> The lookup phase of exception handling is fine. However, something goes
> wrong in cleanup phase. The reason is the unwinder evaluates CFI directives
> until _Unwind_Resume, and `.cfi_def_cfa_offset 16` is the culprit. I th...
2012 Apr 05
0
[LLVMdev] Suboptimal code due to excessive spilling
...for (int i = 0; i != k;++i)
{
s += sum(&x[i], 18);
p[i] = 5; // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
return s;
}
====== Output A ======
======================
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...
2013 Sep 05
2
[LLVMdev] CFI Directives
...ind information using just the CFI directives. 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_off...
2013 Sep 06
0
[LLVMdev] CFI Directives
...e CFI directives. 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:
>...
2019 Feb 05
2
clang emits calls to consexpr function.
...$cat test.cpp
constexpr int product()
{
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)
mov...
2014 May 11
2
[LLVMdev] [cfe-dev] Code generation for noexcept functions
...> .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, -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
>...
2017 Apr 05
2
Deopt operand bundle behavior
...{ i8*, i8* } %0, 1
%2 = bitcast i8* %1 to void ()*
call void %2() [ "deopt"() ]
ret void
}
We get this output machine code for x86_64:
_testFunc: ## @testFunc
.cfi_startproc
## BB#0: ## %entry
pushq %rax
Lcfi0:
.cfi_def_cfa_offset 16
callq _getCode
callq *%rax
Ltmp0:
popq %rax
retq
Without the deopt operand bundle:
_testFunc: ## @testFunc
.cfi_startproc
## BB#0: ## %entry
pushq %rax
Lcfi0:
.cfi_def_cfa_offset 16
callq _getCo...
2016 Jun 30
4
Help required regarding IPRA and Local Function optimization
...ersion_min 10, 12
.p2align 4, 0x90
_foo: ## @foo
.cfi_startproc
## BB#0:
## InlineAsm 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...
2012 Mar 02
3
[LLVMdev] how to annotate assembler
...option -dp (or -dP for more verbose output)
to annotate assembler with instruction 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...
2012 May 24
4
[LLVMdev] use AVX automatically if present
....ll
.file "avx.ll"
.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...
2012 Mar 02
0
[LLVMdev] how to annotate assembler
...ng -S -O0 test.c -mllvm -show-mc-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)...
2018 Jan 17
1
Exception handling support for a target
...ner? I hope someone who has
more exception handling experience can review on it as well.
Thanks.
2018-01-17 3:41 GMT+08:00 Tim Northover <t.p.northover at gmail.com>:
> On 16 January 2018 at 13:41, 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote:
> > bar:
> >
> > .cfi_def_cfa_offset 16
> > epilogue
> >
> > _Unwind_Resume
> >
> >
> >
> > The lookup phase of exception handling is fine. However, something goes
> > wrong in cleanup phase. The reason is the unwinder evaluates CFI
> directives
> > until _Unwind_Resume,...
2018 Sep 14
2
Function calls keep increasing the stack usage
...u
> could provide more detail (what 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
>...
2019 Aug 08
2
Suboptimal code generated by clang+llc in quite a common scenario (?)
...%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)
movl _scscx, %ecx
movb %al, 2(%ecx)
xorl %eax, %eax
popl...
2013 Jul 24
2
[LLVMdev] Program compiled with Clang -pg and -O crashes with SEGFAULT
...optimization, the only difference seems to be that the optimized version removed some register preservation ops before calling mcount().
-pg version, which works:
----------------------------------------
main: # @main
.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
subq $16, %rsp
callq mcount
movl $0, %eax
movl $0, -4(%rbp)
addq $16, %rsp
popq %rbp
ret
-pg -O2 version, which crashes:
--------------------------------------------
main:...
2012 May 24
0
[LLVMdev] use AVX automatically if present
...ot;
> .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
>...