aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-11-22 00:15:34 +0800
committerThomas Preud'homme <robotux@celest.fr>2013-11-22 00:15:34 +0800
commitd9d60a1ebd9ae24aafd2e042d5ad38f515583b7e (patch)
tree6b5f0d846980b6cbe9c3884ca8d78fad9fe9b817
parent63a84713eee3585f8e000a912f9c1799b13f09bd (diff)
downloadtinycc-d9d60a1ebd9ae24aafd2e042d5ad38f515583b7e.tar.gz
tinycc-d9d60a1ebd9ae24aafd2e042d5ad38f515583b7e.tar.bz2
Remove code in arm-gen.c for struct packing in reg
Struct packing in register is now handled since commit 2bbfaf43 by tccgen.c proper.
-rw-r--r--arm-gen.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/arm-gen.c b/arm-gen.c
index dd79c99..92b080d 100644
--- a/arm-gen.c
+++ b/arm-gen.c
@@ -1133,7 +1133,7 @@ static int copy_params(int nb_args, struct plan *plan, int todo)
parameters and the function address. */
void gfunc_call(int nb_args)
{
- int align, r, args_size;
+ int r, args_size;
int variadic;
int todo;
struct plan plan;
@@ -1145,19 +1145,6 @@ void gfunc_call(int nb_args)
r = vtop->r & VT_VALMASK;
if (r == VT_CMP || (r & ~1) == VT_JMP)
gv(RC_INT);
-#ifdef TCC_ARM_EABI
- /* return type is a struct so caller of gfunc_call (unary(void) in tccgen.c)
- assumed it had to be passed by a pointer. Since it's less than 4 bytes, we
- can actually pass it directly in a register. */
- if((vtop[-nb_args].type.ref->type.t & VT_BTYPE) == VT_STRUCT
- && type_size(&vtop[-nb_args].type.ref->type, &align) <= 4) {
- SValue tmp;
- tmp=vtop[-nb_args];
- vtop[-nb_args]=vtop[-nb_args+1];
- vtop[-nb_args+1]=tmp;
- --nb_args;
- }
-#endif
args_size = assign_regs(nb_args, variadic, &plan, &todo);
@@ -1177,16 +1164,11 @@ void gfunc_call(int nb_args)
if (args_size)
gadd_sp(args_size); /* pop all parameters passed on the stack */
#ifdef TCC_ARM_EABI
- if((vtop->type.ref->type.t & VT_BTYPE) == VT_STRUCT
- && type_size(&vtop->type.ref->type, &align) <= 4) {
- store(REG_IRET,vtop-nb_args-1);
- nb_args++;
- }
#ifdef TCC_ARM_VFP
#ifdef TCC_ARM_HARDFLOAT
- else if(variadic && is_float(vtop->type.ref->type.t)) {
+ if(variadic && is_float(vtop->type.ref->type.t)) {
#else
- else if(is_float(vtop->type.ref->type.t)) {
+ rf(is_float(vtop->type.ref->type.t)) {
#endif
if((vtop->type.ref->type.t & VT_BTYPE) == VT_FLOAT) {
o(0xEE000A10); /*vmov s0, r0 */