Skip to contentSkip to conversation

Fix addressing with ramp registers

PATCH In review [email protected] 2 participants 2 messages Aug 25, 2023 – Aug 29, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix addressing with ramp registers

From: Sam Morgan <[email protected]>

---
 target/avr/translate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target/avr/translate.c +3 -1
index ef2edd7415..b1c4bb17a1 100644
@@ -1459,8 +1459,10 @@ static void gen_set_zaddr(TCGv addr)
 static TCGv gen_get_addr(TCGv H, TCGv M, TCGv L)
 {
     TCGv addr = tcg_temp_new_i32();
+    TCGv shifted_H = tcg_temp_new_i32();
 
-    tcg_gen_deposit_tl(addr, M, H, 8, 8);
+    tcg_gen_shri_tl(shifted_H, H, 16);
+    tcg_gen_deposit_tl(addr, M, shifted_H, 8, 8);
     tcg_gen_deposit_tl(addr, L, addr, 8, 16);
 
     return addr;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 13 lines · 25.08.2023 18:23, [email protected] wrote:

From: Sam Morgan <[email protected]>

---
  target/avr/translate.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
target/avr/translate.c +0 -0
index ef2edd7415..b1c4bb17a1 100644
@@ -1459,8 +1459,10 @@ static void gen_set_zaddr(TCGv addr)
  static TCGv gen_get_addr(TCGv H, TCGv M, TCGv L)

target/avr/translate.c static void gen_set_zaddr(TCGv addr) · line 1468

Quoted 10 lines
target/avr/translate.c +3 -1
  {
      TCGv addr = tcg_temp_new_i32();
+    TCGv shifted_H = tcg_temp_new_i32();
 
-    tcg_gen_deposit_tl(addr, M, H, 8, 8);
+    tcg_gen_shri_tl(shifted_H, H, 16);
+    tcg_gen_deposit_tl(addr, M, shifted_H, 8, 8);
      tcg_gen_deposit_tl(addr, L, addr, 8, 16);
 
      return addr;

Please re-send this to qemu-devel@, Cc'ing addresses from
./scripts/get_maintainer.pl -f target/avr/translate.c
the way you sent your submission, no one noticed it, and it is not a trivial change.

/mjt