patch-2.4.15 linux/arch/cris/kernel/kgdb.c

Next file: linux/arch/cris/kernel/ksyms.c
Previous file: linux/arch/cris/kernel/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/arch/cris/kernel/kgdb.c linux/arch/cris/kernel/kgdb.c
@@ -18,6 +18,9 @@
 *! Jul 21 1999  Bjorn Wesen     eLinux port
 *!
 *! $Log: kgdb.c,v $
+*! Revision 1.6  2001/10/09 13:10:03  matsfg
+*! Added $ on registers and removed some underscores
+*!
 *! Revision 1.5  2001/04/17 13:58:39  orjanf
 *! * Renamed CONFIG_KGDB to CONFIG_ETRAX_KGDB.
 *!
@@ -52,7 +55,7 @@
 *!
 *!---------------------------------------------------------------------------
 *!
-*! $Id: kgdb.c,v 1.5 2001/04/17 13:58:39 orjanf Exp $
+*! $Id: kgdb.c,v 1.6 2001/10/09 13:10:03 matsfg Exp $
 *!
 *! (C) Copyright 1999, Axis Communications AB, LUND, SWEDEN
 *!
@@ -1343,90 +1346,90 @@
 void kgdb_handle_breakpoint(void);
 
 asm ("
-  .global _kgdb_handle_breakpoint
-_kgdb_handle_breakpoint:
+  .global kgdb_handle_breakpoint
+kgdb_handle_breakpoint:
 ;;
 ;; Response to the break-instruction
 ;;
 ;; Create a register image of the caller
 ;;
-  move     dccr,[_reg+0x5E] ; Save the flags in DCCR before disable interrupts
+  move     $dccr,[reg+0x5E] ; Save the flags in DCCR before disable interrupts
   di                        ; Disable interrupts
-  move.d   r0,[_reg]        ; Save R0
-  move.d   r1,[_reg+0x04]   ; Save R1
-  move.d   r2,[_reg+0x08]   ; Save R2
-  move.d   r3,[_reg+0x0C]   ; Save R3
-  move.d   r4,[_reg+0x10]   ; Save R4
-  move.d   r5,[_reg+0x14]   ; Save R5
-  move.d   r6,[_reg+0x18]   ; Save R6
-  move.d   r7,[_reg+0x1C]   ; Save R7
-  move.d   r8,[_reg+0x20]   ; Save R8
-  move.d   r9,[_reg+0x24]   ; Save R9
-  move.d   r10,[_reg+0x28]  ; Save R10
-  move.d   r11,[_reg+0x2C]  ; Save R11
-  move.d   r12,[_reg+0x30]  ; Save R12
-  move.d   r13,[_reg+0x34]  ; Save R13
-  move.d   sp,[_reg+0x38]   ; Save SP (R14)
+  move.d   $r0,[reg]        ; Save R0
+  move.d   $r1,[reg+0x04]   ; Save R1
+  move.d   $r2,[reg+0x08]   ; Save R2
+  move.d   $r3,[reg+0x0C]   ; Save R3
+  move.d   $r4,[reg+0x10]   ; Save R4
+  move.d   $r5,[reg+0x14]   ; Save R5
+  move.d   $r6,[reg+0x18]   ; Save R6
+  move.d   $r7,[reg+0x1C]   ; Save R7
+  move.d   $r8,[reg+0x20]   ; Save R8
+  move.d   $r9,[reg+0x24]   ; Save R9
+  move.d   $r10,[reg+0x28]  ; Save R10
+  move.d   $r11,[reg+0x2C]  ; Save R11
+  move.d   $r12,[reg+0x30]  ; Save R12
+  move.d   $r13,[reg+0x34]  ; Save R13
+  move.d   $sp,[reg+0x38]   ; Save SP (R14)
 ;; Due to the old assembler-versions BRP might not be recognized
-  .word 0xE670              ; move brp,r0
-  subq     2,r0             ; Set to address of previous instruction.
-  move.d   r0,[_reg+0x3c]   ; Save the address in PC (R15)
-  clear.b  [_reg+0x40]      ; Clear P0
-  move     vr,[_reg+0x41]   ; Save special register P1
-  clear.w  [_reg+0x42]      ; Clear P4
-  move     ccr,[_reg+0x44]  ; Save special register CCR
-  move     mof,[_reg+0x46]  ; P7
-  clear.d  [_reg+0x4A]      ; Clear P8
-  move     ibr,[_reg+0x4E]  ; P9,
-  move     irp,[_reg+0x52]  ; P10,
-  move     srp,[_reg+0x56]  ; P11,
-  move     dtp0,[_reg+0x5A] ; P12, register BAR, assembler might not know BAR
+  .word 0xE670              ; move brp,$r0
+  subq     2,$r0             ; Set to address of previous instruction.
+  move.d   $r0,[reg+0x3c]   ; Save the address in PC (R15)
+  clear.b  [reg+0x40]      ; Clear P0
+  move     $vr,[reg+0x41]   ; Save special register P1
+  clear.w  [reg+0x42]      ; Clear P4
+  move     $ccr,[reg+0x44]  ; Save special register CCR
+  move     $mof,[reg+0x46]  ; P7
+  clear.d  [reg+0x4A]      ; Clear P8
+  move     $ibr,[reg+0x4E]  ; P9,
+  move     $irp,[reg+0x52]  ; P10,
+  move     $srp,[reg+0x56]  ; P11,
+  move     $dtp0,[reg+0x5A] ; P12, register BAR, assembler might not know BAR
                             ; P13, register DCCR already saved
 ;; Due to the old assembler-versions BRP might not be recognized
   .word 0xE670              ; move brp,r0
 ;; Static (compiled) breakpoints must return to the next instruction in order
 ;; to avoid infinite loops. Dynamic (gdb-invoked) must restore the instruction
 ;; in order to execute it when execution is continued.
-  test.b   [_is_dyn_brkp]    ; Is this a dynamic breakpoint?
+  test.b   [is_dyn_brkp]    ; Is this a dynamic breakpoint?
   beq      is_static         ; No, a static breakpoint
   nop
-  subq     2,r0              ; rerun the instruction the break replaced
+  subq     2,$r0              ; rerun the instruction the break replaced
 is_static:
-  moveq    1,r1
-  move.b   r1,[_is_dyn_brkp] ; Set the state variable to dynamic breakpoint
-  move.d   r0,[_reg+0x62]    ; Save the return address in BRP
-  move     usp,[_reg+0x66]   ; USP
+  moveq    1,$r1
+  move.b   $r1,[is_dyn_brkp] ; Set the state variable to dynamic breakpoint
+  move.d   $r0,[reg+0x62]    ; Save the return address in BRP
+  move     $usp,[reg+0x66]   ; USP
 ;;
 ;; Handle the communication
 ;;
-  move.d   _internal_stack+1020,sp ; Use the internal stack which grows upward
-  moveq    5,r10                   ; SIGTRAP
-  jsr      _handle_exception       ; Interactive routine
+  move.d   internal_stack+1020,$sp ; Use the internal stack which grows upward
+  moveq    5,$r10                   ; SIGTRAP
+  jsr      handle_exception       ; Interactive routine
 ;;
 ;; Return to the caller
 ;;
-   move.d  [_reg],r0         ; Restore R0
-   move.d  [_reg+0x04],r1    ; Restore R1
-   move.d  [_reg+0x08],r2    ; Restore R2
-   move.d  [_reg+0x0C],r3    ; Restore R3
-   move.d  [_reg+0x10],r4    ; Restore R4
-   move.d  [_reg+0x14],r5    ; Restore R5
-   move.d  [_reg+0x18],r6    ; Restore R6
-   move.d  [_reg+0x1C],r7    ; Restore R7
-   move.d  [_reg+0x20],r8    ; Restore R8
-   move.d  [_reg+0x24],r9    ; Restore R9
-   move.d  [_reg+0x28],r10   ; Restore R10
-   move.d  [_reg+0x2C],r11   ; Restore R11
-   move.d  [_reg+0x30],r12   ; Restore R12
-   move.d  [_reg+0x34],r13   ; Restore R13
+   move.d  [reg],$r0         ; Restore R0
+   move.d  [reg+0x04],$r1    ; Restore R1
+   move.d  [reg+0x08],$r2    ; Restore R2
+   move.d  [reg+0x0C],$r3    ; Restore R3
+   move.d  [reg+0x10],$r4    ; Restore R4
+   move.d  [reg+0x14],$r5    ; Restore R5
+   move.d  [reg+0x18],$r6    ; Restore R6
+   move.d  [reg+0x1C],$r7    ; Restore R7
+   move.d  [reg+0x20],$r8    ; Restore R8
+   move.d  [reg+0x24],$r9    ; Restore R9
+   move.d  [reg+0x28],$r10   ; Restore R10
+   move.d  [reg+0x2C],$r11   ; Restore R11
+   move.d  [reg+0x30],$r12   ; Restore R12
+   move.d  [reg+0x34],$r13   ; Restore R13
 ;;
 ;; FIXME: Which registers should be restored?
 ;;
-   move.d  [_reg+0x38],sp    ; Restore SP (R14)
-   move    [_reg+0x56],srp   ; Restore the subroutine return pointer.
-   move    [_reg+0x5E],dccr  ; Restore DCCR
-   move    [_reg+0x66],usp   ; Restore USP
-   jump    [_reg+0x62]       ; A jump to the content in register BRP works.
+   move.d  [reg+0x38],$sp    ; Restore SP (R14)
+   move    [reg+0x56],$srp   ; Restore the subroutine return pointer.
+   move    [reg+0x5E],$dccr  ; Restore DCCR
+   move    [reg+0x66],$usp   ; Restore USP
+   jump    [reg+0x62]       ; A jump to the content in register BRP works.
    nop                       ;
 ");
 
@@ -1440,85 +1443,85 @@
 void kgdb_handle_serial(void);
 
 asm ("
-  .global _kgdb_handle_serial
-_kgdb_handle_serial:
+  .global kgdb_handle_serial
+kgdb_handle_serial:
 ;;
 ;; Response to a serial interrupt
 ;;
 
-  move     dccr,[_reg+0x5E] ; Save the flags in DCCR
+  move     $dccr,[reg+0x5E] ; Save the flags in DCCR
   di                        ; Disable interrupts
-  move.d   r0,[_reg]        ; Save R0
-  move.d   r1,[_reg+0x04]   ; Save R1
-  move.d   r2,[_reg+0x08]   ; Save R2
-  move.d   r3,[_reg+0x0C]   ; Save R3
-  move.d   r4,[_reg+0x10]   ; Save R4
-  move.d   r5,[_reg+0x14]   ; Save R5
-  move.d   r6,[_reg+0x18]   ; Save R6
-  move.d   r7,[_reg+0x1C]   ; Save R7
-  move.d   r8,[_reg+0x20]   ; Save R8
-  move.d   r9,[_reg+0x24]   ; Save R9
-  move.d   r10,[_reg+0x28]  ; Save R10
-  move.d   r11,[_reg+0x2C]  ; Save R11
-  move.d   r12,[_reg+0x30]  ; Save R12
-  move.d   r13,[_reg+0x34]  ; Save R13
-  move.d   sp,[_reg+0x38]   ; Save SP (R14)
-  move     irp,[_reg+0x3c]  ; Save the address in PC (R15)
-  clear.b  [_reg+0x40]      ; Clear P0
-  move     vr,[_reg+0x41]   ; Save special register P1,
-  clear.w  [_reg+0x42]      ; Clear P4
-  move     ccr,[_reg+0x44]  ; Save special register CCR
-  move     mof,[_reg+0x46]  ; P7
-  clear.d  [_reg+0x4A]      ; Clear P8
-  move     ibr,[_reg+0x4E]  ; P9,
-  move     irp,[_reg+0x52]  ; P10,
-  move     srp,[_reg+0x56]  ; P11,
-  move     dtp0,[_reg+0x5A] ; P12, register BAR, assembler might not know BAR
+  move.d   $r0,[reg]        ; Save R0
+  move.d   $r1,[reg+0x04]   ; Save R1
+  move.d   $r2,[reg+0x08]   ; Save R2
+  move.d   $r3,[reg+0x0C]   ; Save R3
+  move.d   $r4,[reg+0x10]   ; Save R4
+  move.d   $r5,[reg+0x14]   ; Save R5
+  move.d   $r6,[reg+0x18]   ; Save R6
+  move.d   $r7,[reg+0x1C]   ; Save R7
+  move.d   $r8,[reg+0x20]   ; Save R8
+  move.d   $r9,[reg+0x24]   ; Save R9
+  move.d   $r10,[reg+0x28]  ; Save R10
+  move.d   $r11,[reg+0x2C]  ; Save R11
+  move.d   $r12,[reg+0x30]  ; Save R12
+  move.d   $r13,[reg+0x34]  ; Save R13
+  move.d   $sp,[reg+0x38]   ; Save SP (R14)
+  move     $irp,[reg+0x3c]  ; Save the address in PC (R15)
+  clear.b  [reg+0x40]      ; Clear P0
+  move     $vr,[reg+0x41]   ; Save special register P1,
+  clear.w  [reg+0x42]      ; Clear P4
+  move     $ccr,[reg+0x44]  ; Save special register CCR
+  move     $mof,[reg+0x46]  ; P7
+  clear.d  [reg+0x4A]      ; Clear P8
+  move     $ibr,[reg+0x4E]  ; P9,
+  move     $irp,[reg+0x52]  ; P10,
+  move     $srp,[reg+0x56]  ; P11,
+  move     $dtp0,[reg+0x5A] ; P12, register BAR, assembler might not know BAR
                             ; P13, register DCCR already saved
 ;; Due to the old assembler-versions BRP might not be recognized
   .word 0xE670              ; move brp,r0
-  move.d   r0,[_reg+0x62]   ; Save the return address in BRP
-  move     usp,[_reg+0x66]  ; USP
+  move.d   $r0,[reg+0x62]   ; Save the return address in BRP
+  move     $usp,[reg+0x66]  ; USP
 
 ;; get the serial character (from debugport.c) and check if its a ctrl-c
 
-  jsr _getDebugChar
-  cmp.b 3, r10
+  jsr getDebugChar
+  cmp.b 3, $r10
   bne goback
   nop
 
 ;;
 ;; Handle the communication
 ;;
-  move.d   _internal_stack+1020,sp ; Use the internal stack
-  moveq    2,r10                   ; SIGINT
-  jsr      _handle_exception       ; Interactive routine
+  move.d   internal_stack+1020,$sp ; Use the internal stack
+  moveq    2,$r10                   ; SIGINT
+  jsr      handle_exception       ; Interactive routine
 
 goback:
 ;;
 ;; Return to the caller
 ;;
-   move.d  [_reg],r0         ; Restore R0
-   move.d  [_reg+0x04],r1    ; Restore R1
-   move.d  [_reg+0x08],r2    ; Restore R2
-   move.d  [_reg+0x0C],r3    ; Restore R3
-   move.d  [_reg+0x10],r4    ; Restore R4
-   move.d  [_reg+0x14],r5    ; Restore R5
-   move.d  [_reg+0x18],r6    ; Restore R6
-   move.d  [_reg+0x1C],r7    ; Restore R7
-   move.d  [_reg+0x20],r8    ; Restore R8
-   move.d  [_reg+0x24],r9    ; Restore R9
-   move.d  [_reg+0x28],r10   ; Restore R10
-   move.d  [_reg+0x2C],r11   ; Restore R11
-   move.d  [_reg+0x30],r12   ; Restore R12
-   move.d  [_reg+0x34],r13   ; Restore R13
+   move.d  [reg],$r0         ; Restore R0
+   move.d  [reg+0x04],$r1    ; Restore R1
+   move.d  [reg+0x08],$r2    ; Restore R2
+   move.d  [reg+0x0C],$r3    ; Restore R3
+   move.d  [reg+0x10],$r4    ; Restore R4
+   move.d  [reg+0x14],$r5    ; Restore R5
+   move.d  [reg+0x18],$r6    ; Restore R6
+   move.d  [reg+0x1C],$r7    ; Restore R7
+   move.d  [reg+0x20],$r8    ; Restore R8
+   move.d  [reg+0x24],$r9    ; Restore R9
+   move.d  [reg+0x28],$r10   ; Restore R10
+   move.d  [reg+0x2C],$r11   ; Restore R11
+   move.d  [reg+0x30],$r12   ; Restore R12
+   move.d  [reg+0x34],$r13   ; Restore R13
 ;;
 ;; FIXME: Which registers should be restored?
 ;;
-   move.d  [_reg+0x38],sp    ; Restore SP (R14)
-   move    [_reg+0x56],srp   ; Restore the subroutine return pointer.
-   move    [_reg+0x5E],dccr  ; Restore DCCR
-   move    [_reg+0x66],usp   ; Restore USP
+   move.d  [reg+0x38],$sp    ; Restore SP (R14)
+   move    [reg+0x56],$srp   ; Restore the subroutine return pointer.
+   move    [reg+0x5E],$dccr  ; Restore DCCR
+   move    [reg+0x66],$usp   ; Restore USP
    reti                      ; Return from the interrupt routine
    nop
 ");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)