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 {
59
59
unsigned TySize = getContext ().getTypeSize (Ty);
60
60
61
61
// 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 () ) {
63
63
NumRegs -= 2 ;
64
64
return ABIArgInfo::getExtend (Ty);
65
65
}
Original file line number Diff line number Diff line change @@ -114,3 +114,13 @@ struct s15 fooa(char a, char b) {
114
114
x .arr [1 ] = b ;
115
115
return x ;
116
116
}
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