<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
i am trying to disable reserved call frame from the x86 backend, by
setting hasReservedCallFrame function, in<br>
lib/Target/X86/X86RegisterInfo.cpp to always return false. When
doing this i get the correct frame size,<br>
and the sub/add rsp instructions around the call correctly, but it
seems that the offsets from rsp are not<br>
correctly updated between the sub instruction and the call.<br>
<br>
Is this some kind of a bug, or i should make more changes to disable
reserved call frame ?<br>
<br>
Here is a piece of the output of the testcase with the
reservedCallFrame enabled:<br>
<br>
# BB#26: # %L51<br>
movq 536(%rsp), %rbp<br>
movq $-5, 536(%rsp)<br>
movq 552(%rsp), %rsi<br>
movq 560(%rsp), %rdx<br>
movq 544(%rsp), %rcx<br>
movq %rdi, (%rsp)<br>
movq $2, 8(%rsp)<br>
sarq $4, %rbp<br>
leaq <b>128</b>(%rsp), %rdi<br>
movq %rbp, %r8<br>
movq <b>40</b>(%rsp), %r9 # 8-byte Reload<br>
callq bs_put_big_integer # a function call with 5
arguments<br>
movq 128(%rsp), %rax<br>
movq 136(%rsp), %rcx<br>
cmpq $0, 144(%rsp)<br>
movq %rcx, 560(%rsp)<br>
movq %rax, 552(%rsp)<br>
jne .LBB0_30<br>
<br>
And the same piece of code with reservedCallFrame disabled:<br>
<br>
# BB#26: # %L51<br>
movq 520(%rsp), %rbp<br>
movq $-5, 520(%rsp)<br>
movq 536(%rsp), %rsi<br>
movq 544(%rsp), %rdx<br>
movq 528(%rsp), %rcx<br>
subq <b>$16</b>, %rsp<br>
movq %rdi, (%rsp)<br>
movq $2, 8(%rsp)<br>
sarq $4, %rbp<br>
leaq <b> 112</b>(%rsp), %rdi<br>
movq %rbp, %r8<br>
movq <b> 24</b>(%rsp), %r9 # 8-byte Reload<br>
callq bs_put_big_integer # a function call with 5
arguments<br>
addq $<b>16</b>, %rsp<br>
movq 112(%rsp), %rax<br>
movq 120(%rsp), %rcx<br>
cmpq $0, 128(%rsp)<br>
movq %rcx, 544(%rsp)<br>
movq %rax, 536(%rsp)<br>
jne .LBB0_30<br>
<br>
Thanks<br>
Chris Stavrakakis<br>
</body>
</html>