diff options
author | Ron Unrau <runrau@cygnus> | 1998-02-23 23:40:40 +0000 |
---|---|---|
committer | Ron Unrau <runrau@cygnus> | 1998-02-23 23:40:40 +0000 |
commit | ce4713dc3b85fce3d7f4395d446887717ac86e99 (patch) | |
tree | 4ef6028201343a2a350c8ff5b908809755eb56ec /sim/mips/interp.c | |
parent | fc96bc860d48675ac702504d52b376253f26118b (diff) | |
download | gdb-ce4713dc3b85fce3d7f4395d446887717ac86e99.zip gdb-ce4713dc3b85fce3d7f4395d446887717ac86e99.tar.gz gdb-ce4713dc3b85fce3d7f4395d446887717ac86e99.tar.bz2 |
Make it compile again for -DTARGET_SKY
Diffstat (limited to 'sim/mips/interp.c')
-rw-r--r-- | sim/mips/interp.c | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 8f2553e..fa83966 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -632,28 +632,29 @@ sim_store_register (sd,rn,memory,length) HI1 = T2H_8(*(unsigned64*)memory); return 8; } - /* end-sanitize-r5900 */ + /* start-sanitize-sky */ #ifdef TARGET_SKY - else if( rn > NUM_R5900_REGS ) { - rn = rn - NUM_R5900_REGS; - - if( rn < 16 ) - vu_regs[0].i[rn] = T2H_2( *(unsigned short *) memory ); - else if( rn < NUM_VU_REGS ) - vu_regs[0].f[rn - 16] = T2H_4( *(unsigned int *) memory ); - else { - rn = rn - NUM_VU_REGS; + if (rn > NUM_R5900_REGS) + { + rn = rn - NUM_R5900_REGS; if( rn < 16 ) - vu_regs[1].i[rn] = T2H_2( *(unsigned short *) memory ); + vu_regs[0].i[rn] = T2H_2( *(unsigned short *) memory ); else if( rn < NUM_VU_REGS ) - vu_regs[1].f[rn - 16] = T2H_4( *(unsigned int *) memory ); - else - sim_io_eprintf( sd, "Invalid VU register (register store ignored)\n" ); + vu_regs[0].f[rn - 16] = T2H_4( *(unsigned int *) memory ); + else { + rn = rn - NUM_VU_REGS; + + if( rn < 16 ) + vu_regs[1].i[rn] = T2H_2( *(unsigned short *) memory ); + else if( rn < NUM_VU_REGS ) + vu_regs[1].f[rn - 16] = T2H_4( *(unsigned int *) memory ); + else + sim_io_eprintf( sd, "Invalid VU register (register store ignored)\n" ); + } } - } #endif /* end-sanitize-sky */ @@ -721,31 +722,31 @@ sim_fetch_register (sd,rn,memory,length) *((unsigned64*)memory) = H2T_8(HI1); return 8; } - /* end-sanitize-r5900 */ + /* start-sanitize-sky */ #ifdef TARGET_SKY - if( rn > NUM_R5900_REGS ) { - rn = rn - NUM_R5900_REGS; - - if( rn < 16 ) - *((unsigned short *) memory) = H2T_2( vu_regs[0].i[rn] ); - else if( rn < NUM_VU_REGS ) - *((unsigned int *) memory) = H2T_4( vu_regs[0].f[rn - 16] ); - else { - rn = rn - NUM_VU_REGS; + if( rn > NUM_R5900_REGS ) + { + rn = rn - NUM_R5900_REGS; if( rn < 16 ) - (*(unsigned short *) memory) = H2T_2( vu_regs[1].i[rn] ); + *((unsigned short *) memory) = H2T_2( vu_regs[0].i[rn] ); else if( rn < NUM_VU_REGS ) - (*(unsigned int *) memory) = H2T_4( vu_regs[1].f[rn - 16] ); - else - sim_io_eprintf( sd, "Invalid VU register (register fetch ignored)\n" ); + *((unsigned int *) memory) = H2T_4( vu_regs[0].f[rn - 16] ); + else { + rn = rn - NUM_VU_REGS; + + if( rn < 16 ) + (*(unsigned short *) memory) = H2T_2( vu_regs[1].i[rn] ); + else if( rn < NUM_VU_REGS ) + (*(unsigned int *) memory) = H2T_4( vu_regs[1].f[rn - 16] ); + else + sim_io_eprintf( sd, "Invalid VU register (register fetch ignored)\n" ); + } + return -1; } - return -1; - } #endif - /* end-sanitize-sky */ /* Any floating point register */ |