sparc64: fix 128-bit atomic load from nucleus context
PATCH 1/1 sparc64: fix 128-bit atomic load from nucleus context
From: Igor V. Kovalenko <[email protected]>
--- sparc-dis.c | 2 ++ target-sparc/op_helper.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-)
sparc-dis.c +2 -0
@@ -2155,6 +2155,8 @@ static const arg asi_table_v9[] =/* These are UltraSPARC extensions. */ { 0x14, "#ASI_PHYS_USE_EC"}, { 0x15, "#ASI_PHYS_BYPASS_EC_WITH_EBIT"}, + { 0x24, "#ASI_NUCLEUS_QUAD_LDD" }, + { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_LITTLE" }, { 0x45, "#ASI_LSU_CONTROL_REG"}, { 0x47, "#ASI_DCACHE_TAG"}, { 0x49, "#ASI_INTR_RECEIVE"},
target-sparc/op_helper.c +5 -5
@@ -3088,19 +3088,19 @@ void helper_ldda_asi(target_ulong addr, int asi, int rd)case 0x2c :// Nucleus quad LDD 128 bit atomic LE helper_check_align (addr,0xf );if (rd ==0 ) { - env->gregs[1 ] =ldq_kernel (addr +8 ); + env->gregs[1 ] =ldq_nucleus (addr +8 );if (asi ==0x2c )bswap64s (&env->gregs[1 ]); }else if (rd <8 ) { - env->gregs[rd] =ldq_kernel (addr); - env->gregs[rd +1 ] =ldq_kernel (addr +8 ); + env->gregs[rd] =ldq_nucleus (addr); + env->gregs[rd +1 ] =ldq_nucleus (addr +8 );if (asi ==0x2c ) {bswap64s (&env->gregs[rd]);bswap64s (&env->gregs[rd +1 ]); } }else { - env->regwptr[rd] =ldq_kernel (addr); - env->regwptr[rd +1 ] =ldq_kernel (addr +8 ); + env->regwptr[rd] =ldq_nucleus (addr); + env->regwptr[rd +1 ] =ldq_nucleus (addr +8 );if (asi ==0x2c ) {bswap64s (&env->regwptr[rd]);bswap64s (&env->regwptr[rd +1 ]);
Quoted 13 lines · Igor V. Kovalenko
From: Igor V. Kovalenko <[email protected]>
Signed-off-by Igor V. Kovalenko <[email protected]>---
sparc-dis.c | 2 ++
target-sparc/op_helper.c | 10 +++++-----2 files changed, 7 insertions(+), 5 deletions(-)sparc-dis.c +0
-0
sparc-dis.c static const arg asi_table_v9[] = · line 2162
Quoted 8 lines
sparc-dis.c +2
-0@@ -2155,6 +2155,8 @@ static const arg asi_table_v9[] = /* These are UltraSPARC extensions. */ { 0x14, "#ASI_PHYS_USE_EC"}, { 0x15, "#ASI_PHYS_BYPASS_EC_WITH_EBIT"}, + { 0x24, "#ASI_NUCLEUS_QUAD_LDD" }, + { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_LITTLE" }, { 0x45, "#ASI_LSU_CONTROL_REG"}, { 0x47, "#ASI_DCACHE_TAG"}, { 0x49, "#ASI_INTR_RECEIVE"},
The patch does not apply because the above line is not in the tree.
This change should be also mentioned in the commit body.
Quoted 32 lines
target-sparc/op_helper.c +0
-0@@ -3088,19 +3088,19 @@ void helper_ldda_asi(target_ulong addr, int asi, int rd)case
0x2c: // Nucleus quad LDD 128 bit atomic LEhelper_check_align(addr, 0xf);
if (rd == 0) {
- env->gregs[1] =ldq_kernel(addr + 8);
+ env->gregs[1] =ldq_nucleus(addr + 8); if (asi ==0x2c)bswap64s(&env->gregs[1]);
} else if (rd < 8) {
- env->gregs[rd] =ldq_kernel(addr);
- env->gregs[rd + 1] =ldq_kernel(addr + 8);
+ env->gregs[rd] =ldq_nucleus(addr);
+ env->gregs[rd + 1] =ldq_nucleus(addr + 8); if (asi ==0x2c) {bswap64s(&env->gregs[rd]);bswap64s(&env->gregs[rd + 1]);
}
} else {
- env->regwptr[rd] =ldq_kernel(addr);
- env->regwptr[rd + 1] =ldq_kernel(addr + 8);
+ env->regwptr[rd] =ldq_nucleus(addr);
+ env->regwptr[rd + 1] =ldq_nucleus(addr + 8); if (asi ==0x2c) {bswap64s(&env->regwptr[rd]);bswap64s(&env->regwptr[rd + 1]);
Quoted 26 lines · Blue Swirl
Quoted 13 lines · Igor V. Kovalenko
From: Igor V. Kovalenko <[email protected]>
Signed-off-by Igor V. Kovalenko <[email protected]>---
sparc-dis.c | 2 ++
target-sparc/op_helper.c | 10 +++++-----2 files changed, 7 insertions(+), 5 deletions(-)sparc-dis.c +0
-0sparc-dis.c static const arg asi_table_v9[] = · line 2162
Quoted 8 lines
sparc-dis.c +2
-0@@ -2155,6 +2155,8 @@ static const arg asi_table_v9[] = /* These are UltraSPARC extensions. */ { 0x14, "#ASI_PHYS_USE_EC"}, { 0x15, "#ASI_PHYS_BYPASS_EC_WITH_EBIT"}, + { 0x24, "#ASI_NUCLEUS_QUAD_LDD" }, + { 0x2c, "#ASI_NUCLEUS_QUAD_LDD_LITTLE" }, { 0x45, "#ASI_LSU_CONTROL_REG"}, { 0x47, "#ASI_DCACHE_TAG"}, { 0x49, "#ASI_INTR_RECEIVE"},The patch does not apply because the above line is not in the tree.
Quoted 1 line
This change should be also mentioned in the commit body.
I decided to drop disassembler update, it can be done separately once for all ASI extensions.
Signature · 2 lines
Kind regards, Igor V. Kovalenko