File tree 1 file changed +9
-14
lines changed
1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -1066,21 +1066,16 @@ fixlargeoffset(Node *n)
1066
1066
return ;
1067
1067
if (n -> op != OINDREG )
1068
1068
return ;
1069
- if (n -> val . u . reg == D_R0 + REGSP ) // stack offset cannot be large
1069
+ if (-4096 <= n -> xoffset && n -> xoffset < 4096 )
1070
1070
return ;
1071
- if (n -> xoffset != (int32 )n -> xoffset ) {
1072
- // TODO(minux): offset too large, move into R31 and add to R31 instead.
1073
- // this is used only in test/fixedbugs/issue6036.go.
1074
- print ("offset too large: %N\n" , n );
1075
- noimpl ;
1076
- a = * n ;
1077
- a .op = OREGISTER ;
1078
- a .type = types [tptr ];
1079
- a .xoffset = 0 ;
1080
- cgen_checknil (& a );
1081
- ginscon (optoas (OADD , types [tptr ]), n -> xoffset , & a );
1082
- n -> xoffset = 0 ;
1083
- }
1071
+
1072
+ a = * n ;
1073
+ a .op = OREGISTER ;
1074
+ a .type = types [tptr ];
1075
+ a .xoffset = 0 ;
1076
+ cgen_checknil (& a );
1077
+ ginscon (optoas (OADD , types [tptr ]), n -> xoffset , & a );
1078
+ n -> xoffset = 0 ;
1084
1079
}
1085
1080
1086
1081
/*
You can’t perform that action at this time.
0 commit comments