diff options
| author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-12-05 16:45:31 +0000 |
|---|---|---|
| committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-12-05 16:45:31 +0000 |
| commit | 78c8084d712fe751a299d62eb866ae40f6c70293 (patch) | |
| tree | dfa90c2ded3c7899fda969c8f8ac6bea5aaf7960 | |
| parent | ad2a2cca60f96c9aac55aaa13cdbec92af777dc2 (diff) | |
| download | fpc-78c8084d712fe751a299d62eb866ae40f6c70293.tar.gz | |
* same fixes as in r16255 for x86_64 (fixes webtbs/tw17714 on Darwin/x86_64)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16508 3ad0048d-3df7-0310-abae-a5850022a9f2
| -rw-r--r-- | compiler/x86_64/nx64cnv.pas | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/x86_64/nx64cnv.pas b/compiler/x86_64/nx64cnv.pas index 52ec46c005..527492f4cf 100644 --- a/compiler/x86_64/nx64cnv.pas +++ b/compiler/x86_64/nx64cnv.pas @@ -124,10 +124,12 @@ implementation end; LOC_REFERENCE : begin - inc(left.location.reference.offset,4); - emit_const_ref(A_BT,S_L,31,left.location.reference); - dec(left.location.reference.offset,4); - current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_Q,left.location.reference,location.register)); + href:=left.location.reference; + tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,href); + inc(href.offset,4); + emit_const_ref(A_BT,S_L,31,href); + dec(href.offset,4); + current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(op,S_Q,href,location.register)); end; else internalerror(200710181); @@ -136,6 +138,8 @@ implementation cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NC,l2); current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1)); reference_reset_symbol(href,l1,0,4); + { simplify for PIC } + tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,href); { I got these constant from a test program (FK) } if is_double(resultdef) then @@ -143,7 +147,6 @@ implementation { double (2^64) } current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit(0)); current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($43f00000)); - { simplify for PIC } tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,href); current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(A_ADDSD,S_NO,href,location.register)); end @@ -151,8 +154,6 @@ implementation begin { single(2^64) } current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($5f800000)); - { simplify for PIC } - tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,href); current_asmdata.CurrAsmList.concat(taicpu.op_ref_reg(A_ADDSS,S_NO,href,location.register)); end else |
