@@ -559,7 +559,7 @@ static void tcg_out_bl_imm(TCGContext *s, ARMCond cond, int32_t offset)
559
559
(((offset - 8 ) >> 2 ) & 0x00ffffff ));
560
560
}
561
561
562
- static void tcg_out_blx_reg (TCGContext *s, ARMCond cond, int rn)
562
+ static void tcg_out_blx_reg (TCGContext *s, ARMCond cond, TCGReg rn)
563
563
{
564
564
tcg_out32 (s, (cond << 28 ) | 0x012fff30 | rn);
565
565
}
@@ -570,14 +570,14 @@ static void tcg_out_blx_imm(TCGContext *s, int32_t offset)
570
570
(((offset - 8 ) >> 2 ) & 0x00ffffff ));
571
571
}
572
572
573
- static void tcg_out_dat_reg (TCGContext *s, ARMCond cond, ARMInsn opc, int rd,
574
- int rn, int rm, int shift)
573
+ static void tcg_out_dat_reg (TCGContext *s, ARMCond cond, ARMInsn opc,
574
+ TCGReg rd, TCGReg rn, TCGReg rm, int shift)
575
575
{
576
576
tcg_out32 (s, (cond << 28 ) | (0 << 25 ) | opc |
577
577
(rn << 16 ) | (rd << 12 ) | shift | rm);
578
578
}
579
579
580
- static void tcg_out_mov_reg (TCGContext *s, ARMCond cond, int rd, int rm)
580
+ static void tcg_out_mov_reg (TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rm)
581
581
{
582
582
/* Simple reg-reg move, optimising out the 'do nothing' case */
583
583
if (rd != rm) {
@@ -604,7 +604,7 @@ static void tcg_out_b_reg(TCGContext *s, ARMCond cond, TCGReg rn)
604
604
}
605
605
606
606
static void tcg_out_dat_imm (TCGContext *s, ARMCond cond, ARMInsn opc,
607
- int rd, int rn, int im)
607
+ TCGReg rd, TCGReg rn, int im)
608
608
{
609
609
tcg_out32 (s, (cond << 28 ) | (1 << 25 ) | opc |
610
610
(rn << 16 ) | (rd << 12 ) | im);
@@ -788,13 +788,15 @@ static void tcg_out_ld8s_r(TCGContext *s, ARMCond cond, TCGReg rt,
788
788
tcg_out_memop_r (s, cond, INSN_LDRSB_REG, rt, rn, rm, 1 , 1 , 0 );
789
789
}
790
790
791
- static void tcg_out_movi_pool (TCGContext *s, ARMCond cond, int rd, uint32_t arg)
791
+ static void tcg_out_movi_pool (TCGContext *s, ARMCond cond,
792
+ TCGReg rd, uint32_t arg)
792
793
{
793
794
new_pool_label (s, arg, R_ARM_PC13, s->code_ptr , 0 );
794
795
tcg_out_ld32_12 (s, cond, rd, TCG_REG_PC, 0 );
795
796
}
796
797
797
- static void tcg_out_movi32 (TCGContext *s, ARMCond cond, int rd, uint32_t arg)
798
+ static void tcg_out_movi32 (TCGContext *s, ARMCond cond,
799
+ TCGReg rd, uint32_t arg)
798
800
{
799
801
int imm12, diff, opc, sh1, sh2;
800
802
uint32_t tt0, tt1, tt2;
@@ -873,8 +875,8 @@ static void tcg_out_movi32(TCGContext *s, ARMCond cond, int rd, uint32_t arg)
873
875
* Emit either the reg,imm or reg,reg form of a data-processing insn.
874
876
* rhs must satisfy the "rI" constraint.
875
877
*/
876
- static void tcg_out_dat_rI (TCGContext *s, ARMCond cond, ARMInsn opc, TCGArg dst,
877
- TCGArg lhs, TCGArg rhs, int rhs_is_const)
878
+ static void tcg_out_dat_rI (TCGContext *s, ARMCond cond, ARMInsn opc,
879
+ TCGReg dst, TCGReg lhs, TCGArg rhs, int rhs_is_const)
878
880
{
879
881
if (rhs_is_const) {
880
882
tcg_out_dat_imm (s, cond, opc, dst, lhs, encode_imm_nofail (rhs));
@@ -904,7 +906,7 @@ static void tcg_out_dat_rIK(TCGContext *s, ARMCond cond, ARMInsn opc,
904
906
}
905
907
906
908
static void tcg_out_dat_rIN (TCGContext *s, ARMCond cond, ARMInsn opc,
907
- ARMInsn opneg, TCGArg dst, TCGArg lhs, TCGArg rhs,
909
+ ARMInsn opneg, TCGReg dst, TCGReg lhs, TCGArg rhs,
908
910
bool rhs_is_const)
909
911
{
910
912
/* Emit either the reg,imm or reg,reg form of a data-processing insn.
@@ -978,17 +980,19 @@ static void tcg_out_smull32(TCGContext *s, ARMCond cond, TCGReg rd0,
978
980
(rd1 << 16 ) | (rd0 << 12 ) | (rm << 8 ) | rn);
979
981
}
980
982
981
- static void tcg_out_sdiv (TCGContext *s, ARMCond cond, int rd, int rn, int rm)
983
+ static void tcg_out_sdiv (TCGContext *s, ARMCond cond,
984
+ TCGReg rd, TCGReg rn, TCGReg rm)
982
985
{
983
986
tcg_out32 (s, 0x0710f010 | (cond << 28 ) | (rd << 16 ) | rn | (rm << 8 ));
984
987
}
985
988
986
- static void tcg_out_udiv (TCGContext *s, ARMCond cond, int rd, int rn, int rm)
989
+ static void tcg_out_udiv (TCGContext *s, ARMCond cond,
990
+ TCGReg rd, TCGReg rn, TCGReg rm)
987
991
{
988
992
tcg_out32 (s, 0x0730f010 | (cond << 28 ) | (rd << 16 ) | rn | (rm << 8 ));
989
993
}
990
994
991
- static void tcg_out_ext8s (TCGContext *s, ARMCond cond, int rd, int rn)
995
+ static void tcg_out_ext8s (TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rn)
992
996
{
993
997
if (use_armv6_instructions) {
994
998
/* sxtb */
@@ -1002,12 +1006,12 @@ static void tcg_out_ext8s(TCGContext *s, ARMCond cond, int rd, int rn)
1002
1006
}
1003
1007
1004
1008
static void __attribute__ ((unused))
1005
- tcg_out_ext8u(TCGContext *s, ARMCond cond, int rd, int rn)
1009
+ tcg_out_ext8u(TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rn)
1006
1010
{
1007
1011
tcg_out_dat_imm (s, cond, ARITH_AND, rd, rn, 0xff );
1008
1012
}
1009
1013
1010
- static void tcg_out_ext16s (TCGContext *s, ARMCond cond, int rd, int rn)
1014
+ static void tcg_out_ext16s (TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rn)
1011
1015
{
1012
1016
if (use_armv6_instructions) {
1013
1017
/* sxth */
@@ -1020,7 +1024,7 @@ static void tcg_out_ext16s(TCGContext *s, ARMCond cond, int rd, int rn)
1020
1024
}
1021
1025
}
1022
1026
1023
- static void tcg_out_ext16u (TCGContext *s, ARMCond cond, int rd, int rn)
1027
+ static void tcg_out_ext16u (TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rn)
1024
1028
{
1025
1029
if (use_armv6_instructions) {
1026
1030
/* uxth */
@@ -1033,7 +1037,8 @@ static void tcg_out_ext16u(TCGContext *s, ARMCond cond, int rd, int rn)
1033
1037
}
1034
1038
}
1035
1039
1036
- static void tcg_out_bswap16 (TCGContext *s, ARMCond cond, int rd, int rn, int flags)
1040
+ static void tcg_out_bswap16 (TCGContext *s, ARMCond cond,
1041
+ TCGReg rd, TCGReg rn, int flags)
1037
1042
{
1038
1043
if (use_armv6_instructions) {
1039
1044
if (flags & TCG_BSWAP_OS) {
@@ -1100,7 +1105,7 @@ static void tcg_out_bswap16(TCGContext *s, ARMCond cond, int rd, int rn, int fla
1100
1105
? SHIFT_IMM_ASR (8 ) : SHIFT_IMM_LSR (8 )));
1101
1106
}
1102
1107
1103
- static void tcg_out_bswap32 (TCGContext *s, ARMCond cond, int rd, int rn)
1108
+ static void tcg_out_bswap32 (TCGContext *s, ARMCond cond, TCGReg rd, TCGReg rn)
1104
1109
{
1105
1110
if (use_armv6_instructions) {
1106
1111
/* rev */
@@ -1130,23 +1135,23 @@ static void tcg_out_deposit(TCGContext *s, ARMCond cond, TCGReg rd,
1130
1135
}
1131
1136
1132
1137
static void tcg_out_extract (TCGContext *s, ARMCond cond, TCGReg rd,
1133
- TCGArg a1 , int ofs, int len)
1138
+ TCGReg rn , int ofs, int len)
1134
1139
{
1135
1140
/* ubfx */
1136
- tcg_out32 (s, 0x07e00050 | (cond << 28 ) | (rd << 12 ) | a1
1141
+ tcg_out32 (s, 0x07e00050 | (cond << 28 ) | (rd << 12 ) | rn
1137
1142
| (ofs << 7 ) | ((len - 1 ) << 16 ));
1138
1143
}
1139
1144
1140
1145
static void tcg_out_sextract (TCGContext *s, ARMCond cond, TCGReg rd,
1141
- TCGArg a1 , int ofs, int len)
1146
+ TCGReg rn , int ofs, int len)
1142
1147
{
1143
1148
/* sbfx */
1144
- tcg_out32 (s, 0x07a00050 | (cond << 28 ) | (rd << 12 ) | a1
1149
+ tcg_out32 (s, 0x07a00050 | (cond << 28 ) | (rd << 12 ) | rn
1145
1150
| (ofs << 7 ) | ((len - 1 ) << 16 ));
1146
1151
}
1147
1152
1148
1153
static void tcg_out_ld32u (TCGContext *s, ARMCond cond,
1149
- int rd, int rn, int32_t offset)
1154
+ TCGReg rd, TCGReg rn, int32_t offset)
1150
1155
{
1151
1156
if (offset > 0xfff || offset < -0xfff ) {
1152
1157
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1156,7 +1161,7 @@ static void tcg_out_ld32u(TCGContext *s, ARMCond cond,
1156
1161
}
1157
1162
1158
1163
static void tcg_out_st32 (TCGContext *s, ARMCond cond,
1159
- int rd, int rn, int32_t offset)
1164
+ TCGReg rd, TCGReg rn, int32_t offset)
1160
1165
{
1161
1166
if (offset > 0xfff || offset < -0xfff ) {
1162
1167
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1166,7 +1171,7 @@ static void tcg_out_st32(TCGContext *s, ARMCond cond,
1166
1171
}
1167
1172
1168
1173
static void tcg_out_ld16u (TCGContext *s, ARMCond cond,
1169
- int rd, int rn, int32_t offset)
1174
+ TCGReg rd, TCGReg rn, int32_t offset)
1170
1175
{
1171
1176
if (offset > 0xff || offset < -0xff ) {
1172
1177
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1176,7 +1181,7 @@ static void tcg_out_ld16u(TCGContext *s, ARMCond cond,
1176
1181
}
1177
1182
1178
1183
static void tcg_out_ld16s (TCGContext *s, ARMCond cond,
1179
- int rd, int rn, int32_t offset)
1184
+ TCGReg rd, TCGReg rn, int32_t offset)
1180
1185
{
1181
1186
if (offset > 0xff || offset < -0xff ) {
1182
1187
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1186,7 +1191,7 @@ static void tcg_out_ld16s(TCGContext *s, ARMCond cond,
1186
1191
}
1187
1192
1188
1193
static void tcg_out_st16 (TCGContext *s, ARMCond cond,
1189
- int rd, int rn, int32_t offset)
1194
+ TCGReg rd, TCGReg rn, int32_t offset)
1190
1195
{
1191
1196
if (offset > 0xff || offset < -0xff ) {
1192
1197
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1196,7 +1201,7 @@ static void tcg_out_st16(TCGContext *s, ARMCond cond,
1196
1201
}
1197
1202
1198
1203
static void tcg_out_ld8u (TCGContext *s, ARMCond cond,
1199
- int rd, int rn, int32_t offset)
1204
+ TCGReg rd, TCGReg rn, int32_t offset)
1200
1205
{
1201
1206
if (offset > 0xfff || offset < -0xfff ) {
1202
1207
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1206,7 +1211,7 @@ static void tcg_out_ld8u(TCGContext *s, ARMCond cond,
1206
1211
}
1207
1212
1208
1213
static void tcg_out_ld8s (TCGContext *s, ARMCond cond,
1209
- int rd, int rn, int32_t offset)
1214
+ TCGReg rd, TCGReg rn, int32_t offset)
1210
1215
{
1211
1216
if (offset > 0xff || offset < -0xff ) {
1212
1217
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
@@ -1216,7 +1221,7 @@ static void tcg_out_ld8s(TCGContext *s, ARMCond cond,
1216
1221
}
1217
1222
1218
1223
static void tcg_out_st8 (TCGContext *s, ARMCond cond,
1219
- int rd, int rn, int32_t offset)
1224
+ TCGReg rd, TCGReg rn, int32_t offset)
1220
1225
{
1221
1226
if (offset > 0xfff || offset < -0xfff ) {
1222
1227
tcg_out_movi32 (s, cond, TCG_REG_TMP, offset);
0 commit comments