History

Fix warning detected by clang when passing unsigned int pointer when signed is expected. Instead of a cast, it would be better to pass the exact type.

Christian Jullien committed 6 years ago

Commit 383acf81 parent 50abaae1 file · +5 −5Browse files

Unified · Split

arm64-gen.c+5−5
@@ -1080,7 +1080,7 @@ ST_FUNC void gfunc_call(int nb_args) · 1079 unmodified lines
1080 else if (a[i] < 32) {1080 else if (a[i] < 32) {
1081 // value in floating-point registers1081 // value in floating-point registers
1082 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {1082 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
1083 uint32_t j, sz, n = arm64_hfa(&vtop->type, &sz);1083 uint32_t j, sz, n = arm64_hfa(&vtop->type, (int *)&sz);
1084 vtop->type.t = VT_PTR;1084 vtop->type.t = VT_PTR;
1085 gaddrof();1085 gaddrof();
1086 gv(RC_R30);1086 gv(RC_R30);
@@ -1129,7 +1129,7 @@ ST_FUNC void gfunc_call(int nb_args) · 42 unmodified lines
1129 1129
1130 }1130 }
1131 else if (a[0] == 16) {1131 else if (a[0] == 16) {
1132 uint32_t j, sz, n = arm64_hfa(return_type, &sz);1132 uint32_t j, sz, n = arm64_hfa(return_type, (int *)&sz);
1133 for (j = 0; j < n; j++)1133 for (j = 0; j < n; j++)
1134 o(0x3d000100 |1134 o(0x3d000100 |
1135 (sz & 16) << 19 | -(sz & 8) << 27 | (sz & 4) << 29 |1135 (sz & 16) << 19 | -(sz & 8) << 27 | (sz & 4) << 29 |
@@ -1205,7 +1205,7 @@ ST_FUNC void gfunc_prolog(Sym *func_sym) · 69 unmodified lines
1205 1205
1206 // HFAs of float and double need to be written differently:1206 // HFAs of float and double need to be written differently:
1207 if (16 <= a[i] && a[i] < 32 && (sym->type.t & VT_BTYPE) == VT_STRUCT) {1207 if (16 <= a[i] && a[i] < 32 && (sym->type.t & VT_BTYPE) == VT_STRUCT) {
1208 uint32_t j, sz, k = arm64_hfa(&sym->type, &sz);1208 uint32_t j, sz, k = arm64_hfa(&sym->type, (int *)&sz);
1209 if (sz < 16)1209 if (sz < 16)
1210 for (j = 0; j < k; j++) {1210 for (j = 0; j < k; j++) {
1211 o(0x3d0003e0 | -(sz & 8) << 27 | (sz & 4) << 29 |1211 o(0x3d0003e0 | -(sz & 8) << 27 | (sz & 4) << 29 |
@@ -1269,7 +1269,7 @@ ST_FUNC void gen_va_start(void) · 57 unmodified lines
1269ST_FUNC void gen_va_arg(CType *t)1269ST_FUNC void gen_va_arg(CType *t)
1270{1270{
1271 int align, size = type_size(t, &align);1271 int align, size = type_size(t, &align);
1272 int fsize, hfa = arm64_hfa(t, &fsize);1272 int fsize, hfa = arm64_hfa(t, (int *)&fsize);
1273 uint32_t r0, r1;1273 uint32_t r0, r1;
1274 1274
1275 if (is_float(t->t)) {1275 if (is_float(t->t)) {
@@ -1379,7 +1379,7 @@ ST_FUNC void gfunc_return(CType *func_type) · 103 unmodified lines
1379 }1379 }
1380 case 16:1380 case 16:
1381 if ((func_type->t & VT_BTYPE) == VT_STRUCT) {1381 if ((func_type->t & VT_BTYPE) == VT_STRUCT) {
1382 uint32_t j, sz, n = arm64_hfa(&vtop->type, &sz);1382 uint32_t j, sz, n = arm64_hfa(&vtop->type, (int *)&sz);
1383 gaddrof();1383 gaddrof();
1384 gv(RC_R(0));1384 gv(RC_R(0));
1385 for (j = 0; j < n; j++)1385 for (j = 0; j < n; j++)

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