File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class AVRABIInfo : public DefaultABIInfo {
5959 unsigned TySize = getContext ().getTypeSize (Ty);
6060
6161 // An int8 type argument always costs two registers like an int16.
62- if (TySize == 8 && NumRegs >= 2 ) {
62+ if (TySize == 8 && NumRegs >= 2 && Ty-> isIntegralOrEnumerationType () ) {
6363 NumRegs -= 2 ;
6464 return ABIArgInfo::getExtend (Ty);
6565 }
Original file line number Diff line number Diff line change @@ -114,3 +114,13 @@ struct s15 fooa(char a, char b) {
114114 x .arr [1 ] = b ;
115115 return x ;
116116}
117+
118+ struct s8_t {
119+ char a ;
120+ };
121+
122+ // AVR: define {{.*}} i8 @foob(i8 {{.*}})
123+ // TINY: define {{.*}} i8 @foob(i8 {{.*}})
124+ char foob (struct s8_t a ) {
125+ return a .a + 1 ;
126+ }
You can’t perform that action at this time.
0 commit comments