mirror of https://github.com/aamine/cbc
r5033@macbookpro: aamine | 2009-06-07 03:17:50 +0900
* sysdep/x86/CodeGenerator.java (compileFunctionBody): fix offset bug. git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4278 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
4ac683c9d7
commit
8f9df4fb03
|
|
@ -1,3 +1,8 @@
|
|||
Sun Jun 7 03:17:06 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* sysdep/x86/CodeGenerator.java (compileFunctionBody): fix offset
|
||||
bug.
|
||||
|
||||
Sun Jun 7 03:02:35 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/sysdep/x86/CodeGenerator.java: refactoring
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ public class CodeGenerator
|
|||
List<Register> saveRegs = usedCalleeSavedRegisters(body);
|
||||
long saveRegsSize = stackSizeFromWordNum(saveRegs.size());
|
||||
fixLocalVariableOffsets(func.body().scope(), saveRegsSize);
|
||||
body.virtualStack.fixOffset(saveRegsSize + lvarsSize);
|
||||
fixTempVariableOffsets(body, saveRegsSize + lvarsSize);
|
||||
|
||||
if (options.isVerboseAsm()) {
|
||||
printStackFrameLayout(file, saveRegsSize, lvarsSize,
|
||||
|
|
@ -603,6 +603,12 @@ public class CodeGenerator
|
|||
}
|
||||
// #@@}
|
||||
|
||||
// #@@range/fixTempVariableOffsets{
|
||||
private void fixTempVariableOffsets(AssemblyFile asm, long len) {
|
||||
asm.virtualStack.fixOffset(-len);
|
||||
}
|
||||
// #@@}
|
||||
|
||||
// #@@range/extendStack{
|
||||
private void extendStack(AssemblyFile file, long len) {
|
||||
if (len > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue