diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2014-01-30 19:44:09 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2014-01-30 19:44:09 +0000 |
commit | 7a08ed98a8981b1cf0ca4158a9e3f9754b9f236a (patch) | |
tree | 2c388f716b939576e7361985a5f4d38db2210417 /compiler/ncgmem.pas | |
parent | 767a7eca6329182d2ca2677e53017411ede68bbb (diff) | |
download | fpc-7a08ed98a8981b1cf0ca4158a9e3f9754b9f236a.tar.gz |
* force records with LOC_CONSTANT into memory when they are subscripted
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@26630 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgmem.pas')
-rw-r--r-- | compiler/ncgmem.pas | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/ncgmem.pas b/compiler/ncgmem.pas index 5c57614157..ae7456dd03 100644 --- a/compiler/ncgmem.pas +++ b/compiler/ncgmem.pas @@ -423,7 +423,12 @@ implementation memory as well } ((left.location.size in [OS_PAIR,OS_SPAIR]) and (vs.fieldoffset div sizeof(aword)<>(vs.fieldoffset+vs.getsize-1) div sizeof(aword))) or - (location.loc in [LOC_MMREGISTER,LOC_FPUREGISTER]) then + (location.loc in [LOC_MMREGISTER,LOC_FPUREGISTER, + { actually, we should be able to "subscript" a constant, but this would require some code + which enables dumping and reading constants from a temporary memory buffer. This + must be done a CPU dependent way, so it is not easy and probably not worth the effort (FK) + } + LOC_CONSTANT]) then hlcg.location_force_mem(current_asmdata.CurrAsmList,location,left.resultdef) else begin |