diff options
author | John van Groningen | 2015-11-20 10:47:13 +0000 |
---|---|---|
committer | John van Groningen | 2015-11-20 10:47:13 +0000 |
commit | b84410b9f4d47a2636048a98721c2a44dde9574e (patch) | |
tree | 3435c3498b2d5a70f6513f76871f1bcf7769b7f2 | |
parent | port centry to ARM for integers, string and arrays (reals not yet implemented), (diff) |
fix bug in ccall for ARM
-rw-r--r-- | cginstructions.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cginstructions.c b/cginstructions.c index 422cbdc..e5b7714 100644 --- a/cginstructions.c +++ b/cginstructions.c @@ -4568,7 +4568,7 @@ void code_ccall (char *c_function_name,char *s,int length) error_s (ccall_error_string,c_function_name); } } - + switch (result){ case 'I': case 'p': @@ -5599,10 +5599,7 @@ void code_ccall (char *c_function_name,char *s,int length) n=new_reg[reg_n]; if (n>=0 && n!=reg_n){ - if (n>4 || n==0){ - i_move_r_r (REGISTER_D0+n,REGISTER_D0+reg_n); - new_reg[reg_n]=-1; - } else if (new_reg[1]!=reg_n && new_reg[2]!=reg_n && new_reg[3]!=reg_n && new_reg[4]!=reg_n){ + if (new_reg[1]!=reg_n && new_reg[2]!=reg_n && new_reg[3]!=reg_n && new_reg[4]!=reg_n){ i_move_r_r (REGISTER_D0+n,REGISTER_D0+reg_n); new_reg[reg_n]=-1; } else |