diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-02-12 03:57:56 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-06-16 07:47:24 -0400 |
commit | 6408ac49979d7035b2e53a9fb326ab0eb98aa6be (patch) | |
tree | 9826413c0cef66984381a0e123ef9098265912f1 /arch/cris | |
parent | d6c97e1ccb01186b3c171a7aa3a043069c134878 (diff) |
cris/kgdb: Make symbols used from asm global
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c3e): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c48): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c50): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c58): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c60): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:(.text+0x2c68): more undefined references to `reg' follow
arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
kgdb.c:(.text+0x2d46): undefined reference to `internal_stack'
kgdb.c:(.text+0x2d4e): undefined reference to `handle_exception'
kgdb.c:(.text+0x2d54): undefined reference to `reg'
kgdb.c:(.text+0x2d5c): undefined reference to `reg'
kgdb.c:(.text+0x2d64): undefined reference to `reg'
kgdb.c:(.text+0x2d6c): undefined reference to `reg'
kgdb.c:(.text+0x2d74): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2d7c): more undefined references to `reg' follow
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
(.text+0x2ef6): undefined reference to `internal_stack'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
(.text+0x2efe): undefined reference to `handle_exception'
arch/cris/arch-v10/kernel/built-in.o: In function `goback':
kgdb.c:(.text+0x2f04): undefined reference to `reg'
kgdb.c:(.text+0x2f0c): undefined reference to `reg'
kgdb.c:(.text+0x2f14): undefined reference to `reg'
kgdb.c:(.text+0x2f1c): undefined reference to `reg'
kgdb.c:(.text+0x2f24): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2f2c): more undefined references to `reg' follow
Make reg, internal_stack, and handle_exception global to fix this.
Rename reg to cris_reg as it's a too generic name for a global symbol.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/arch-v10/kernel/kgdb.c | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index e02d2df5220c..7e24b7339ff8 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c | |||
@@ -329,7 +329,7 @@ static int register_size[] = | |||
329 | 329 | ||
330 | /* Contains the register image of the executing thread in the assembler | 330 | /* Contains the register image of the executing thread in the assembler |
331 | part of the code in order to avoid horrible addressing modes. */ | 331 | part of the code in order to avoid horrible addressing modes. */ |
332 | static registers reg; | 332 | registers cris_reg; |
333 | 333 | ||
334 | /* FIXME: Should this be used? Delete otherwise. */ | 334 | /* FIXME: Should this be used? Delete otherwise. */ |
335 | /* Contains the assumed consistency state of the register image. Uses the | 335 | /* Contains the assumed consistency state of the register image. Uses the |
@@ -337,7 +337,7 @@ static registers reg; | |||
337 | static int consistency_status = SUCCESS; | 337 | static int consistency_status = SUCCESS; |
338 | 338 | ||
339 | /********************************** Handle exceptions ************************/ | 339 | /********************************** Handle exceptions ************************/ |
340 | /* The variable reg contains the register image associated with the | 340 | /* The variable cris_reg contains the register image associated with the |
341 | current_thread_c variable. It is a complete register image created at | 341 | current_thread_c variable. It is a complete register image created at |
342 | entry. The reg_g contains a register image of a task where the general | 342 | entry. The reg_g contains a register image of a task where the general |
343 | registers are taken from the stack and all special registers are taken | 343 | registers are taken from the stack and all special registers are taken |
@@ -351,14 +351,14 @@ static int current_thread_c = 0; | |||
351 | static int current_thread_g = 0; | 351 | static int current_thread_g = 0; |
352 | 352 | ||
353 | /* Need two register images in order to handle Hct and Hgt commands. The | 353 | /* Need two register images in order to handle Hct and Hgt commands. The |
354 | variable reg_g is in addition to reg above. */ | 354 | variable reg_g is in addition to cris_reg above. */ |
355 | static registers reg_g; | 355 | static registers reg_g; |
356 | #endif /* PROCESS_SUPPORT */ | 356 | #endif /* PROCESS_SUPPORT */ |
357 | 357 | ||
358 | /********************************** Breakpoint *******************************/ | 358 | /********************************** Breakpoint *******************************/ |
359 | /* Use an internal stack in the breakpoint and interrupt response routines */ | 359 | /* Use an internal stack in the breakpoint and interrupt response routines */ |
360 | #define INTERNAL_STACK_SIZE 1024 | 360 | #define INTERNAL_STACK_SIZE 1024 |
361 | static char internal_stack[INTERNAL_STACK_SIZE]; | 361 | char internal_stack[INTERNAL_STACK_SIZE]; |
362 | 362 | ||
363 | /* Due to the breakpoint return pointer, a state variable is needed to keep | 363 | /* Due to the breakpoint return pointer, a state variable is needed to keep |
364 | track of whether it is a static (compiled) or dynamic (gdb-invoked) | 364 | track of whether it is a static (compiled) or dynamic (gdb-invoked) |
@@ -667,7 +667,7 @@ static int | |||
667 | write_register (int regno, char *val) | 667 | write_register (int regno, char *val) |
668 | { | 668 | { |
669 | int status = SUCCESS; | 669 | int status = SUCCESS; |
670 | registers *current_reg = ® | 670 | registers *current_reg = &cris_reg; |
671 | 671 | ||
672 | if (regno >= R0 && regno <= PC) { | 672 | if (regno >= R0 && regno <= PC) { |
673 | /* 32-bit register with simple offset. */ | 673 | /* 32-bit register with simple offset. */ |
@@ -737,7 +737,7 @@ write_stack_register (int thread_id, int regno, char *valptr) | |||
737 | static int | 737 | static int |
738 | read_register (char regno, unsigned int *valptr) | 738 | read_register (char regno, unsigned int *valptr) |
739 | { | 739 | { |
740 | registers *current_reg = ® | 740 | registers *current_reg = &cris_reg; |
741 | 741 | ||
742 | if (regno >= R0 && regno <= PC) { | 742 | if (regno >= R0 && regno <= PC) { |
743 | /* 32-bit register with simple offset. */ | 743 | /* 32-bit register with simple offset. */ |
@@ -825,7 +825,7 @@ stub_is_stopped(int sigval) | |||
825 | 825 | ||
826 | /* A struct assignment translates into a libc memcpy call. Avoid | 826 | /* A struct assignment translates into a libc memcpy call. Avoid |
827 | all libc functions in order to prevent recursive break points. */ | 827 | all libc functions in order to prevent recursive break points. */ |
828 | copy_registers (®_g, ®, sizeof(registers)); | 828 | copy_registers (®_g, &cris_reg, sizeof(registers)); |
829 | 829 | ||
830 | /* Store thread:r...; with the executing task TID. */ | 830 | /* Store thread:r...; with the executing task TID. */ |
831 | gdb_cris_strcpy (&remcomOutBuffer[pos], "thread:"); | 831 | gdb_cris_strcpy (&remcomOutBuffer[pos], "thread:"); |
@@ -851,7 +851,7 @@ kill_restart (void) | |||
851 | 851 | ||
852 | /* All expected commands are sent from remote.c. Send a response according | 852 | /* All expected commands are sent from remote.c. Send a response according |
853 | to the description in remote.c. */ | 853 | to the description in remote.c. */ |
854 | static void | 854 | void |
855 | handle_exception (int sigval) | 855 | handle_exception (int sigval) |
856 | { | 856 | { |
857 | /* Avoid warning of not used. */ | 857 | /* Avoid warning of not used. */ |
@@ -877,14 +877,14 @@ handle_exception (int sigval) | |||
877 | { | 877 | { |
878 | #ifdef PROCESS_SUPPORT | 878 | #ifdef PROCESS_SUPPORT |
879 | /* Use the special register content in the executing thread. */ | 879 | /* Use the special register content in the executing thread. */ |
880 | copy_registers (®_g, ®, sizeof(registers)); | 880 | copy_registers (®_g, &cris_reg, sizeof(registers)); |
881 | /* Replace the content available on the stack. */ | 881 | /* Replace the content available on the stack. */ |
882 | if (current_thread_g != executing_task) { | 882 | if (current_thread_g != executing_task) { |
883 | copy_registers_from_stack (current_thread_g, ®_g); | 883 | copy_registers_from_stack (current_thread_g, ®_g); |
884 | } | 884 | } |
885 | mem2hex ((unsigned char *)remcomOutBuffer, (unsigned char *)®_g, sizeof(registers)); | 885 | mem2hex ((unsigned char *)remcomOutBuffer, (unsigned char *)®_g, sizeof(registers)); |
886 | #else | 886 | #else |
887 | mem2hex(remcomOutBuffer, (char *)®, sizeof(registers)); | 887 | mem2hex(remcomOutBuffer, (char *)&cris_reg, sizeof(registers)); |
888 | #endif | 888 | #endif |
889 | } | 889 | } |
890 | break; | 890 | break; |
@@ -897,13 +897,13 @@ handle_exception (int sigval) | |||
897 | #ifdef PROCESS_SUPPORT | 897 | #ifdef PROCESS_SUPPORT |
898 | hex2mem ((unsigned char *)®_g, &remcomInBuffer[1], sizeof(registers)); | 898 | hex2mem ((unsigned char *)®_g, &remcomInBuffer[1], sizeof(registers)); |
899 | if (current_thread_g == executing_task) { | 899 | if (current_thread_g == executing_task) { |
900 | copy_registers (®, ®_g, sizeof(registers)); | 900 | copy_registers (&cris_reg, ®_g, sizeof(registers)); |
901 | } | 901 | } |
902 | else { | 902 | else { |
903 | copy_registers_to_stack(current_thread_g, ®_g); | 903 | copy_registers_to_stack(current_thread_g, ®_g); |
904 | } | 904 | } |
905 | #else | 905 | #else |
906 | hex2mem((char *)®, &remcomInBuffer[1], sizeof(registers)); | 906 | hex2mem((char *)&cris_reg, &remcomInBuffer[1], sizeof(registers)); |
907 | #endif | 907 | #endif |
908 | gdb_cris_strcpy (remcomOutBuffer, "OK"); | 908 | gdb_cris_strcpy (remcomOutBuffer, "OK"); |
909 | break; | 909 | break; |
@@ -1004,7 +1004,7 @@ handle_exception (int sigval) | |||
1004 | Success: return to the executing thread. | 1004 | Success: return to the executing thread. |
1005 | Failure: will never know. */ | 1005 | Failure: will never know. */ |
1006 | if (remcomInBuffer[1] != '\0') { | 1006 | if (remcomInBuffer[1] != '\0') { |
1007 | reg.pc = gdb_cris_strtol (&remcomInBuffer[1], 0, 16); | 1007 | cris_reg.pc = gdb_cris_strtol (&remcomInBuffer[1], 0, 16); |
1008 | } | 1008 | } |
1009 | enableDebugIRQ(); | 1009 | enableDebugIRQ(); |
1010 | return; | 1010 | return; |
@@ -1202,37 +1202,37 @@ asm ("\n" | |||
1202 | ";;\n" | 1202 | ";;\n" |
1203 | ";; Create a register image of the caller\n" | 1203 | ";; Create a register image of the caller\n" |
1204 | ";;\n" | 1204 | ";;\n" |
1205 | " move $dccr,[reg+0x5E] ; Save the flags in DCCR before disable interrupts\n" | 1205 | " move $dccr,[cris_reg+0x5E] ; Save the flags in DCCR before disable interrupts\n" |
1206 | " di ; Disable interrupts\n" | 1206 | " di ; Disable interrupts\n" |
1207 | " move.d $r0,[reg] ; Save R0\n" | 1207 | " move.d $r0,[cris_reg] ; Save R0\n" |
1208 | " move.d $r1,[reg+0x04] ; Save R1\n" | 1208 | " move.d $r1,[cris_reg+0x04] ; Save R1\n" |
1209 | " move.d $r2,[reg+0x08] ; Save R2\n" | 1209 | " move.d $r2,[cris_reg+0x08] ; Save R2\n" |
1210 | " move.d $r3,[reg+0x0C] ; Save R3\n" | 1210 | " move.d $r3,[cris_reg+0x0C] ; Save R3\n" |
1211 | " move.d $r4,[reg+0x10] ; Save R4\n" | 1211 | " move.d $r4,[cris_reg+0x10] ; Save R4\n" |
1212 | " move.d $r5,[reg+0x14] ; Save R5\n" | 1212 | " move.d $r5,[cris_reg+0x14] ; Save R5\n" |
1213 | " move.d $r6,[reg+0x18] ; Save R6\n" | 1213 | " move.d $r6,[cris_reg+0x18] ; Save R6\n" |
1214 | " move.d $r7,[reg+0x1C] ; Save R7\n" | 1214 | " move.d $r7,[cris_reg+0x1C] ; Save R7\n" |
1215 | " move.d $r8,[reg+0x20] ; Save R8\n" | 1215 | " move.d $r8,[cris_reg+0x20] ; Save R8\n" |
1216 | " move.d $r9,[reg+0x24] ; Save R9\n" | 1216 | " move.d $r9,[cris_reg+0x24] ; Save R9\n" |
1217 | " move.d $r10,[reg+0x28] ; Save R10\n" | 1217 | " move.d $r10,[cris_reg+0x28] ; Save R10\n" |
1218 | " move.d $r11,[reg+0x2C] ; Save R11\n" | 1218 | " move.d $r11,[cris_reg+0x2C] ; Save R11\n" |
1219 | " move.d $r12,[reg+0x30] ; Save R12\n" | 1219 | " move.d $r12,[cris_reg+0x30] ; Save R12\n" |
1220 | " move.d $r13,[reg+0x34] ; Save R13\n" | 1220 | " move.d $r13,[cris_reg+0x34] ; Save R13\n" |
1221 | " move.d $sp,[reg+0x38] ; Save SP (R14)\n" | 1221 | " move.d $sp,[cris_reg+0x38] ; Save SP (R14)\n" |
1222 | ";; Due to the old assembler-versions BRP might not be recognized\n" | 1222 | ";; Due to the old assembler-versions BRP might not be recognized\n" |
1223 | " .word 0xE670 ; move brp,$r0\n" | 1223 | " .word 0xE670 ; move brp,$r0\n" |
1224 | " subq 2,$r0 ; Set to address of previous instruction.\n" | 1224 | " subq 2,$r0 ; Set to address of previous instruction.\n" |
1225 | " move.d $r0,[reg+0x3c] ; Save the address in PC (R15)\n" | 1225 | " move.d $r0,[cris_reg+0x3c] ; Save the address in PC (R15)\n" |
1226 | " clear.b [reg+0x40] ; Clear P0\n" | 1226 | " clear.b [cris_reg+0x40] ; Clear P0\n" |
1227 | " move $vr,[reg+0x41] ; Save special register P1\n" | 1227 | " move $vr,[cris_reg+0x41] ; Save special register P1\n" |
1228 | " clear.w [reg+0x42] ; Clear P4\n" | 1228 | " clear.w [cris_reg+0x42] ; Clear P4\n" |
1229 | " move $ccr,[reg+0x44] ; Save special register CCR\n" | 1229 | " move $ccr,[cris_reg+0x44] ; Save special register CCR\n" |
1230 | " move $mof,[reg+0x46] ; P7\n" | 1230 | " move $mof,[cris_reg+0x46] ; P7\n" |
1231 | " clear.d [reg+0x4A] ; Clear P8\n" | 1231 | " clear.d [cris_reg+0x4A] ; Clear P8\n" |
1232 | " move $ibr,[reg+0x4E] ; P9,\n" | 1232 | " move $ibr,[cris_reg+0x4E] ; P9,\n" |
1233 | " move $irp,[reg+0x52] ; P10,\n" | 1233 | " move $irp,[cris_reg+0x52] ; P10,\n" |
1234 | " move $srp,[reg+0x56] ; P11,\n" | 1234 | " move $srp,[cris_reg+0x56] ; P11,\n" |
1235 | " move $dtp0,[reg+0x5A] ; P12, register BAR, assembler might not know BAR\n" | 1235 | " move $dtp0,[cris_reg+0x5A] ; P12, register BAR, assembler might not know BAR\n" |
1236 | " ; P13, register DCCR already saved\n" | 1236 | " ; P13, register DCCR already saved\n" |
1237 | ";; Due to the old assembler-versions BRP might not be recognized\n" | 1237 | ";; Due to the old assembler-versions BRP might not be recognized\n" |
1238 | " .word 0xE670 ; move brp,r0\n" | 1238 | " .word 0xE670 ; move brp,r0\n" |
@@ -1246,8 +1246,8 @@ asm ("\n" | |||
1246 | "is_static:\n" | 1246 | "is_static:\n" |
1247 | " moveq 1,$r1\n" | 1247 | " moveq 1,$r1\n" |
1248 | " move.b $r1,[is_dyn_brkp] ; Set the state variable to dynamic breakpoint\n" | 1248 | " move.b $r1,[is_dyn_brkp] ; Set the state variable to dynamic breakpoint\n" |
1249 | " move.d $r0,[reg+0x62] ; Save the return address in BRP\n" | 1249 | " move.d $r0,[cris_reg+0x62] ; Save the return address in BRP\n" |
1250 | " move $usp,[reg+0x66] ; USP\n" | 1250 | " move $usp,[cris_reg+0x66] ; USP\n" |
1251 | ";;\n" | 1251 | ";;\n" |
1252 | ";; Handle the communication\n" | 1252 | ";; Handle the communication\n" |
1253 | ";;\n" | 1253 | ";;\n" |
@@ -1257,28 +1257,28 @@ asm ("\n" | |||
1257 | ";;\n" | 1257 | ";;\n" |
1258 | ";; Return to the caller\n" | 1258 | ";; Return to the caller\n" |
1259 | ";;\n" | 1259 | ";;\n" |
1260 | " move.d [reg],$r0 ; Restore R0\n" | 1260 | " move.d [cris_reg],$r0 ; Restore R0\n" |
1261 | " move.d [reg+0x04],$r1 ; Restore R1\n" | 1261 | " move.d [cris_reg+0x04],$r1 ; Restore R1\n" |
1262 | " move.d [reg+0x08],$r2 ; Restore R2\n" | 1262 | " move.d [cris_reg+0x08],$r2 ; Restore R2\n" |
1263 | " move.d [reg+0x0C],$r3 ; Restore R3\n" | 1263 | " move.d [cris_reg+0x0C],$r3 ; Restore R3\n" |
1264 | " move.d [reg+0x10],$r4 ; Restore R4\n" | 1264 | " move.d [cris_reg+0x10],$r4 ; Restore R4\n" |
1265 | " move.d [reg+0x14],$r5 ; Restore R5\n" | 1265 | " move.d [cris_reg+0x14],$r5 ; Restore R5\n" |
1266 | " move.d [reg+0x18],$r6 ; Restore R6\n" | 1266 | " move.d [cris_reg+0x18],$r6 ; Restore R6\n" |
1267 | " move.d [reg+0x1C],$r7 ; Restore R7\n" | 1267 | " move.d [cris_reg+0x1C],$r7 ; Restore R7\n" |
1268 | " move.d [reg+0x20],$r8 ; Restore R8\n" | 1268 | " move.d [cris_reg+0x20],$r8 ; Restore R8\n" |
1269 | " move.d [reg+0x24],$r9 ; Restore R9\n" | 1269 | " move.d [cris_reg+0x24],$r9 ; Restore R9\n" |
1270 | " move.d [reg+0x28],$r10 ; Restore R10\n" | 1270 | " move.d [cris_reg+0x28],$r10 ; Restore R10\n" |
1271 | " move.d [reg+0x2C],$r11 ; Restore R11\n" | 1271 | " move.d [cris_reg+0x2C],$r11 ; Restore R11\n" |
1272 | " move.d [reg+0x30],$r12 ; Restore R12\n" | 1272 | " move.d [cris_reg+0x30],$r12 ; Restore R12\n" |
1273 | " move.d [reg+0x34],$r13 ; Restore R13\n" | 1273 | " move.d [cris_reg+0x34],$r13 ; Restore R13\n" |
1274 | ";;\n" | 1274 | ";;\n" |
1275 | ";; FIXME: Which registers should be restored?\n" | 1275 | ";; FIXME: Which registers should be restored?\n" |
1276 | ";;\n" | 1276 | ";;\n" |
1277 | " move.d [reg+0x38],$sp ; Restore SP (R14)\n" | 1277 | " move.d [cris_reg+0x38],$sp ; Restore SP (R14)\n" |
1278 | " move [reg+0x56],$srp ; Restore the subroutine return pointer.\n" | 1278 | " move [cris_reg+0x56],$srp ; Restore the subroutine return pointer.\n" |
1279 | " move [reg+0x5E],$dccr ; Restore DCCR\n" | 1279 | " move [cris_reg+0x5E],$dccr ; Restore DCCR\n" |
1280 | " move [reg+0x66],$usp ; Restore USP\n" | 1280 | " move [cris_reg+0x66],$usp ; Restore USP\n" |
1281 | " jump [reg+0x62] ; A jump to the content in register BRP works.\n" | 1281 | " jump [cris_reg+0x62] ; A jump to the content in register BRP works.\n" |
1282 | " nop ;\n" | 1282 | " nop ;\n" |
1283 | "\n"); | 1283 | "\n"); |
1284 | 1284 | ||
@@ -1298,39 +1298,39 @@ asm ("\n" | |||
1298 | ";; Response to a serial interrupt\n" | 1298 | ";; Response to a serial interrupt\n" |
1299 | ";;\n" | 1299 | ";;\n" |
1300 | "\n" | 1300 | "\n" |
1301 | " move $dccr,[reg+0x5E] ; Save the flags in DCCR\n" | 1301 | " move $dccr,[cris_reg+0x5E] ; Save the flags in DCCR\n" |
1302 | " di ; Disable interrupts\n" | 1302 | " di ; Disable interrupts\n" |
1303 | " move.d $r0,[reg] ; Save R0\n" | 1303 | " move.d $r0,[cris_reg] ; Save R0\n" |
1304 | " move.d $r1,[reg+0x04] ; Save R1\n" | 1304 | " move.d $r1,[cris_reg+0x04] ; Save R1\n" |
1305 | " move.d $r2,[reg+0x08] ; Save R2\n" | 1305 | " move.d $r2,[cris_reg+0x08] ; Save R2\n" |
1306 | " move.d $r3,[reg+0x0C] ; Save R3\n" | 1306 | " move.d $r3,[cris_reg+0x0C] ; Save R3\n" |
1307 | " move.d $r4,[reg+0x10] ; Save R4\n" | 1307 | " move.d $r4,[cris_reg+0x10] ; Save R4\n" |
1308 | " move.d $r5,[reg+0x14] ; Save R5\n" | 1308 | " move.d $r5,[cris_reg+0x14] ; Save R5\n" |
1309 | " move.d $r6,[reg+0x18] ; Save R6\n" | 1309 | " move.d $r6,[cris_reg+0x18] ; Save R6\n" |
1310 | " move.d $r7,[reg+0x1C] ; Save R7\n" | 1310 | " move.d $r7,[cris_reg+0x1C] ; Save R7\n" |
1311 | " move.d $r8,[reg+0x20] ; Save R8\n" | 1311 | " move.d $r8,[cris_reg+0x20] ; Save R8\n" |
1312 | " move.d $r9,[reg+0x24] ; Save R9\n" | 1312 | " move.d $r9,[cris_reg+0x24] ; Save R9\n" |
1313 | " move.d $r10,[reg+0x28] ; Save R10\n" | 1313 | " move.d $r10,[cris_reg+0x28] ; Save R10\n" |
1314 | " move.d $r11,[reg+0x2C] ; Save R11\n" | 1314 | " move.d $r11,[cris_reg+0x2C] ; Save R11\n" |
1315 | " move.d $r12,[reg+0x30] ; Save R12\n" | 1315 | " move.d $r12,[cris_reg+0x30] ; Save R12\n" |
1316 | " move.d $r13,[reg+0x34] ; Save R13\n" | 1316 | " move.d $r13,[cris_reg+0x34] ; Save R13\n" |
1317 | " move.d $sp,[reg+0x38] ; Save SP (R14)\n" | 1317 | " move.d $sp,[cris_reg+0x38] ; Save SP (R14)\n" |
1318 | " move $irp,[reg+0x3c] ; Save the address in PC (R15)\n" | 1318 | " move $irp,[cris_reg+0x3c] ; Save the address in PC (R15)\n" |
1319 | " clear.b [reg+0x40] ; Clear P0\n" | 1319 | " clear.b [cris_reg+0x40] ; Clear P0\n" |
1320 | " move $vr,[reg+0x41] ; Save special register P1,\n" | 1320 | " move $vr,[cris_reg+0x41] ; Save special register P1,\n" |
1321 | " clear.w [reg+0x42] ; Clear P4\n" | 1321 | " clear.w [cris_reg+0x42] ; Clear P4\n" |
1322 | " move $ccr,[reg+0x44] ; Save special register CCR\n" | 1322 | " move $ccr,[cris_reg+0x44] ; Save special register CCR\n" |
1323 | " move $mof,[reg+0x46] ; P7\n" | 1323 | " move $mof,[cris_reg+0x46] ; P7\n" |
1324 | " clear.d [reg+0x4A] ; Clear P8\n" | 1324 | " clear.d [cris_reg+0x4A] ; Clear P8\n" |
1325 | " move $ibr,[reg+0x4E] ; P9,\n" | 1325 | " move $ibr,[cris_reg+0x4E] ; P9,\n" |
1326 | " move $irp,[reg+0x52] ; P10,\n" | 1326 | " move $irp,[cris_reg+0x52] ; P10,\n" |
1327 | " move $srp,[reg+0x56] ; P11,\n" | 1327 | " move $srp,[cris_reg+0x56] ; P11,\n" |
1328 | " move $dtp0,[reg+0x5A] ; P12, register BAR, assembler might not know BAR\n" | 1328 | " move $dtp0,[cris_reg+0x5A] ; P12, register BAR, assembler might not know BAR\n" |
1329 | " ; P13, register DCCR already saved\n" | 1329 | " ; P13, register DCCR already saved\n" |
1330 | ";; Due to the old assembler-versions BRP might not be recognized\n" | 1330 | ";; Due to the old assembler-versions BRP might not be recognized\n" |
1331 | " .word 0xE670 ; move brp,r0\n" | 1331 | " .word 0xE670 ; move brp,r0\n" |
1332 | " move.d $r0,[reg+0x62] ; Save the return address in BRP\n" | 1332 | " move.d $r0,[cris_reg+0x62] ; Save the return address in BRP\n" |
1333 | " move $usp,[reg+0x66] ; USP\n" | 1333 | " move $usp,[cris_reg+0x66] ; USP\n" |
1334 | "\n" | 1334 | "\n" |
1335 | ";; get the serial character (from debugport.c) and check if it is a ctrl-c\n" | 1335 | ";; get the serial character (from debugport.c) and check if it is a ctrl-c\n" |
1336 | "\n" | 1336 | "\n" |
@@ -1339,7 +1339,7 @@ asm ("\n" | |||
1339 | " bne goback\n" | 1339 | " bne goback\n" |
1340 | " nop\n" | 1340 | " nop\n" |
1341 | "\n" | 1341 | "\n" |
1342 | " move.d [reg+0x5E], $r10 ; Get DCCR\n" | 1342 | " move.d [cris_reg+0x5E], $r10 ; Get DCCR\n" |
1343 | " btstq 8, $r10 ; Test the U-flag.\n" | 1343 | " btstq 8, $r10 ; Test the U-flag.\n" |
1344 | " bmi goback\n" | 1344 | " bmi goback\n" |
1345 | " nop\n" | 1345 | " nop\n" |
@@ -1355,27 +1355,27 @@ asm ("\n" | |||
1355 | ";;\n" | 1355 | ";;\n" |
1356 | ";; Return to the caller\n" | 1356 | ";; Return to the caller\n" |
1357 | ";;\n" | 1357 | ";;\n" |
1358 | " move.d [reg],$r0 ; Restore R0\n" | 1358 | " move.d [cris_reg],$r0 ; Restore R0\n" |
1359 | " move.d [reg+0x04],$r1 ; Restore R1\n" | 1359 | " move.d [cris_reg+0x04],$r1 ; Restore R1\n" |
1360 | " move.d [reg+0x08],$r2 ; Restore R2\n" | 1360 | " move.d [cris_reg+0x08],$r2 ; Restore R2\n" |
1361 | " move.d [reg+0x0C],$r3 ; Restore R3\n" | 1361 | " move.d [cris_reg+0x0C],$r3 ; Restore R3\n" |
1362 | " move.d [reg+0x10],$r4 ; Restore R4\n" | 1362 | " move.d [cris_reg+0x10],$r4 ; Restore R4\n" |
1363 | " move.d [reg+0x14],$r5 ; Restore R5\n" | 1363 | " move.d [cris_reg+0x14],$r5 ; Restore R5\n" |
1364 | " move.d [reg+0x18],$r6 ; Restore R6\n" | 1364 | " move.d [cris_reg+0x18],$r6 ; Restore R6\n" |
1365 | " move.d [reg+0x1C],$r7 ; Restore R7\n" | 1365 | " move.d [cris_reg+0x1C],$r7 ; Restore R7\n" |
1366 | " move.d [reg+0x20],$r8 ; Restore R8\n" | 1366 | " move.d [cris_reg+0x20],$r8 ; Restore R8\n" |
1367 | " move.d [reg+0x24],$r9 ; Restore R9\n" | 1367 | " move.d [cris_reg+0x24],$r9 ; Restore R9\n" |
1368 | " move.d [reg+0x28],$r10 ; Restore R10\n" | 1368 | " move.d [cris_reg+0x28],$r10 ; Restore R10\n" |
1369 | " move.d [reg+0x2C],$r11 ; Restore R11\n" | 1369 | " move.d [cris_reg+0x2C],$r11 ; Restore R11\n" |
1370 | " move.d [reg+0x30],$r12 ; Restore R12\n" | 1370 | " move.d [cris_reg+0x30],$r12 ; Restore R12\n" |
1371 | " move.d [reg+0x34],$r13 ; Restore R13\n" | 1371 | " move.d [cris_reg+0x34],$r13 ; Restore R13\n" |
1372 | ";;\n" | 1372 | ";;\n" |
1373 | ";; FIXME: Which registers should be restored?\n" | 1373 | ";; FIXME: Which registers should be restored?\n" |
1374 | ";;\n" | 1374 | ";;\n" |
1375 | " move.d [reg+0x38],$sp ; Restore SP (R14)\n" | 1375 | " move.d [cris_reg+0x38],$sp ; Restore SP (R14)\n" |
1376 | " move [reg+0x56],$srp ; Restore the subroutine return pointer.\n" | 1376 | " move [cris_reg+0x56],$srp ; Restore the subroutine return pointer.\n" |
1377 | " move [reg+0x5E],$dccr ; Restore DCCR\n" | 1377 | " move [cris_reg+0x5E],$dccr ; Restore DCCR\n" |
1378 | " move [reg+0x66],$usp ; Restore USP\n" | 1378 | " move [cris_reg+0x66],$usp ; Restore USP\n" |
1379 | " reti ; Return from the interrupt routine\n" | 1379 | " reti ; Return from the interrupt routine\n" |
1380 | " nop\n" | 1380 | " nop\n" |
1381 | "\n"); | 1381 | "\n"); |