summaryrefslogtreecommitdiff
path: root/compiler/ncgadd.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-04-15 15:54:10 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2012-04-15 15:54:10 +0000
commitfee1bb3ec8fc6e8b528ef2fefb1ebe63758f162b (patch)
tree62af4439c8c2569f831cd135a6c5bf397de464d4 /compiler/ncgadd.pas
parent4c6a532db289fbfb49487652fb644b77d0e6977a (diff)
parentb4e67ab336b17cc2fd10d3121d5af87c5d9b071d (diff)
downloadfpc-fee1bb3ec8fc6e8b528ef2fefb1ebe63758f162b.tar.gz
* merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch o empty ansistrings are now always represented by a nil pointer rather than by an empty string, because an empty string also has a code page which can confuse code (although this will make ansistrings harder to use in Java code) o more string helpers code shared between the general and jvm rtl o support for indexbyte/word in the jvm rtl (warning: first parameter is an open array rather than an untyped parameter there, so indexchar(pcharvar^,10,0) will be equivalent to indexchar[pcharvar^],10,0) there, which is different from what is intended; changing it to an untyped parameter wouldn't help though) o default() support is not yet complete o calling fpcres is currently broken due to limitations in sysutils.executeprocess() regarding handling unix quoting and the compiler using the same command lines for scripts and directly calling external programs o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1 to the make command line git-svn-id: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@20887 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgadd.pas')
-rw-r--r--compiler/ncgadd.pas7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/ncgadd.pas b/compiler/ncgadd.pas
index 6b8d4ae2e5..7ec3829c5a 100644
--- a/compiler/ncgadd.pas
+++ b/compiler/ncgadd.pas
@@ -304,6 +304,13 @@ interface
if (right.location.size<>left.location.size) or
(location.size<>left.location.size) then
internalerror(2010123001);
+ { make sure that location.register is different from
+ left.location.register, since right will overwrite it
+ and we'll use left afterwards }
+ if (right.location.loc=LOC_REGISTER) then
+ location.register:=right.location.register
+ else
+ location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
{ make sure we don't modify left/right.location, because we told
force_reg_left_right above that they can be constant }
hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,resultdef,right.location.register,location.register);