History

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.

Thomas Preud'homme committed 12 years ago

Commit d9d60a11 parent 63a84711 file · +3 −21Browse files

Unified · Split

arm-gen.c+3−21
@@ -1133,7 +1133,7 @@ static int copy_params(int nb_args, struct plan *plan, int todo) · 1132 unmodified lines
11331133 parameters and the function address. */
11341134 void gfunc_call(int nb_args)
11351135 {
1136− int align, r, args_size;
1136+ int r, args_size;
11371137 int variadic;
11381138 int todo;
11391139 struct plan plan;
@@ -1145,19 +1145,6 @@ void gfunc_call(int nb_args) · 5 unmodified lines
11451145 r = vtop->r & VT_VALMASK;
11461146 if (r == VT_CMP || (r & ~1) == VT_JMP)
11471147 gv(RC_INT);
1148−#ifdef TCC_ARM_EABI
1149− /* return type is a struct so caller of gfunc_call (unary(void) in tccgen.c)
1150− assumed it had to be passed by a pointer. Since it's less than 4 bytes, we
1151− can actually pass it directly in a register. */
1152− if((vtop[-nb_args].type.ref->type.t & VT_BTYPE) == VT_STRUCT
1153− && type_size(&vtop[-nb_args].type.ref->type, &align) <= 4) {
1154− SValue tmp;
1155− tmp=vtop[-nb_args];
1156− vtop[-nb_args]=vtop[-nb_args+1];
1157− vtop[-nb_args+1]=tmp;
1158− --nb_args;
1159− }
1160−#endif
11611148
11621149 args_size = assign_regs(nb_args, variadic, &plan, &todo);
11631150
@@ -1177,16 +1164,11 @@ void gfunc_call(int nb_args) · 13 unmodified lines
11771164 if (args_size)
11781165 gadd_sp(args_size); /* pop all parameters passed on the stack */
11791166 #ifdef TCC_ARM_EABI
1180− if((vtop->type.ref->type.t & VT_BTYPE) == VT_STRUCT
1181− && type_size(&vtop->type.ref->type, &align) <= 4) {
1182− store(REG_IRET,vtop-nb_args-1);
1183− nb_args++;
1184− }
11851167 #ifdef TCC_ARM_VFP
11861168 #ifdef TCC_ARM_HARDFLOAT
1187− else if(variadic && is_float(vtop->type.ref->type.t)) {
1169+ if(variadic && is_float(vtop->type.ref->type.t)) {
11881170 #else
1189− else if(is_float(vtop->type.ref->type.t)) {
1171+ rf(is_float(vtop->type.ref->type.t)) {
11901172 #endif
11911173 if((vtop->type.ref->type.t & VT_BTYPE) == VT_FLOAT) {
11921174 o(0xEE000A10); /*vmov s0, r0 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t