From e8aef1d3b5bab81b8f9a9630763557b149c88ec9 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 20 Jun 2002 07:23:08 +0000 Subject: Use suword16/fuword16 instead of susword/fusword - this has two different definitions so far.. 16 bit on x86 and appears to be 32 bit on sparc64. Be explicit to avoid suprises. --- sys/gnu/i386/fpemul/load_store.c | 6 +++--- sys/gnu/i386/fpemul/reg_ld_str.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'sys/gnu') diff --git a/sys/gnu/i386/fpemul/load_store.c b/sys/gnu/i386/fpemul/load_store.c index 2cfbba506147..28e35f474479 100644 --- a/sys/gnu/i386/fpemul/load_store.c +++ b/sys/gnu/i386/fpemul/load_store.c @@ -201,7 +201,7 @@ load_store_instr(char type) break; case 024: /* fldcw */ REENTRANT_CHECK(OFF); - control_word = fusword((unsigned short *) FPU_data_address); + control_word = fuword16((unsigned short *) FPU_data_address); REENTRANT_CHECK(ON); #ifdef NO_UNDERFLOW_TRAP if (!(control_word & EX_Underflow)) { @@ -242,7 +242,7 @@ load_store_instr(char type) case 034: /* fstcw m16int */ REENTRANT_CHECK(OFF); /* verify_area(VERIFY_WRITE, FPU_data_address, 2);*/ - susword( (short *) FPU_data_address,control_word); + suword16( (short *) FPU_data_address,control_word); REENTRANT_CHECK(ON); /* We want no net effect: */ FPU_data_address = (void *) (intptr_t ) data_operand_offset; @@ -258,7 +258,7 @@ load_store_instr(char type) status_word |= (top & 7) << SW_Top_Shift; REENTRANT_CHECK(OFF); /* verify_area(VERIFY_WRITE, FPU_data_address, 2);*/ - susword( (short *) FPU_data_address,status_word); + suword16( (short *) FPU_data_address,status_word); REENTRANT_CHECK(ON); /* We want no net effect: */ FPU_data_address = (void *) (intptr_t) data_operand_offset; diff --git a/sys/gnu/i386/fpemul/reg_ld_str.c b/sys/gnu/i386/fpemul/reg_ld_str.c index 5a2bcb812695..9c13b11f3666 100644 --- a/sys/gnu/i386/fpemul/reg_ld_str.c +++ b/sys/gnu/i386/fpemul/reg_ld_str.c @@ -110,7 +110,7 @@ reg_load_extended(void) * hence re-entrancy problems can arise */ sigl = fuword((unsigned long *) s); sigh = fuword(1 + (unsigned long *) s); - exp = fusword(4 + (unsigned short *) s); + exp = fuword16(4 + (unsigned short *) s); REENTRANT_CHECK(ON); FPU_loaded_data.sigl = sigl; @@ -361,7 +361,7 @@ reg_load_int16(void) REENTRANT_CHECK(OFF); /* Cast as short to get the sign extended. */ - s = (short) fusword((unsigned short *) _s); + s = (short) fuword16((unsigned short *) _s); REENTRANT_CHECK(ON); if (s == 0) { @@ -527,7 +527,7 @@ reg_store_extended(void) /* verify_area(VERIFY_WRITE, d, 10); */ suword((unsigned long *) d, ls); suword(1 + (unsigned long *) d, ms); - susword(4 + (short *) d, (unsigned short) e | sign); + suword16(4 + (short *) d, (unsigned short) e | sign); REENTRANT_CHECK(ON); return 1; @@ -1001,7 +1001,7 @@ reg_store_int16(void) /* Put out the QNaN indefinite */ REENTRANT_CHECK(OFF); /* verify_area(VERIFY_WRITE, d, 2);*/ - susword((unsigned short *) d, 0x8000); + suword16((unsigned short *) d, 0x8000); REENTRANT_CHECK(ON); return 1; } else @@ -1025,7 +1025,7 @@ reg_store_int16(void) REENTRANT_CHECK(OFF); /* verify_area(VERIFY_WRITE, d, 2); */ - susword((short *) d, (short) t.sigl); + suword16((short *) d, (short) t.sigl); REENTRANT_CHECK(ON); return 1; @@ -1164,9 +1164,9 @@ fldenv(void) int i; REENTRANT_CHECK(OFF); - control_word = fusword((unsigned short *) s); - status_word = fusword((unsigned short *) (s + 4)); - tag_word = fusword((unsigned short *) (s + 8)); + control_word = fuword16((unsigned short *) s); + status_word = fuword16((unsigned short *) (s + 4)); + tag_word = fuword16((unsigned short *) (s + 8)); ip_offset = fuword((unsigned long *) (s + 0x0c)); cs_selector = fuword((unsigned long *) (s + 0x10)); data_operand_offset = fuword((unsigned long *) (s + 0x14)); @@ -1285,9 +1285,9 @@ fstenv(void) #endif /****/ REENTRANT_CHECK(OFF); - susword((unsigned short *) d, control_word); - susword((unsigned short *) (d + 4), (status_word & ~SW_Top) | ((top & 7) << SW_Top_Shift)); - susword((unsigned short *) (d + 8), tag_word()); + suword16((unsigned short *) d, control_word); + suword16((unsigned short *) (d + 4), (status_word & ~SW_Top) | ((top & 7) << SW_Top_Shift)); + suword16((unsigned short *) (d + 8), tag_word()); suword((unsigned long *) (d + 0x0c), ip_offset); suword((unsigned long *) (d + 0x10), cs_selector); suword((unsigned long *) (d + 0x14), data_operand_offset); @@ -1378,7 +1378,7 @@ fsave(void) } e |= rp->sign == SIGN_POS ? 0 : 0x8000; REENTRANT_CHECK(OFF); - susword((unsigned short *) (d + i * 10 + 8), e); + suword16((unsigned short *) (d + i * 10 + 8), e); REENTRANT_CHECK(ON); } -- cgit v1.3