Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 The immediate offset of "ldtrb", "l...



details:   https://anonhg.NetBSD.org/src/rev/e3643ac05e74
branches:  trunk
changeset: 1019023:e3643ac05e74
user:      ryo <ryo%NetBSD.org@localhost>
date:      Tue Feb 23 17:48:46 2021 +0000

description:
The immediate offset of "ldtrb", "ldtrh", "sttrb", and "sttrh" was always output as unsigned.
Correctly, it is 9bit signed.

diffstat:

 sys/arch/aarch64/aarch64/disasm.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r a23ff432150c -r e3643ac05e74 sys/arch/aarch64/aarch64/disasm.c
--- a/sys/arch/aarch64/aarch64/disasm.c Tue Feb 23 17:30:56 2021 +0000
+++ b/sys/arch/aarch64/aarch64/disasm.c Tue Feb 23 17:48:46 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disasm.c,v 1.11 2021/02/23 17:30:56 ryo Exp $  */
+/*     $NetBSD: disasm.c,v 1.12 2021/02/23 17:48:46 ryo Exp $  */
 
 /*
  * Copyright (c) 2018 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.11 2021/02/23 17:30:56 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disasm.c,v 1.12 2021/02/23 17:48:46 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -2126,7 +2126,7 @@
                PRINTF("ldtrb\t%s, [%s,#%"PRId64"]\n",
                    ZREGNAME(0, Rt),
                    SREGNAME(1, Rn),
-                   SignExtend(12, imm9, 1));
+                   SignExtend(9, imm9, 1));
        }
 }
 
@@ -2140,7 +2140,7 @@
                PRINTF("ldtrh\t%s, [%s,#%"PRId64"]\n",
                    ZREGNAME(0, Rt),
                    SREGNAME(1, Rn),
-                   SignExtend(12, imm9, 1));
+                   SignExtend(9, imm9, 1));
        }
 }
 
@@ -3000,7 +3000,7 @@
                PRINTF("sttrb\t%s, [%s,#%"PRId64"]\n",
                    ZREGNAME(0, Rt),
                    SREGNAME(1, Rn),
-                   SignExtend(12, imm9, 1));
+                   SignExtend(9, imm9, 1));
        }
 }
 
@@ -3014,7 +3014,7 @@
                PRINTF("sttrh\t%s, [%s,#%"PRId64"]\n",
                    ZREGNAME(0, Rt),
                    SREGNAME(1, Rn),
-                   SignExtend(12, imm9, 1));
+                   SignExtend(9, imm9, 1));
        }
 }
 



Home | Main Index | Thread Index | Old Index