home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / config / unix / linux / parisc.s < prev    next >
Text File  |  2002-01-25  |  1KB  |  69 lines

  1. ; coexpression code for HP PA-RISC architecture for Icon 8.10
  2. ;
  3. ; n.b.  two of the three coexpression tests work, but coexpression
  4. ;    *transmission*, a rarely used feature, does not
  5.  
  6.     .CODE
  7.         .IMPORT syserr
  8.     .EXPORT    coswitch
  9. coswitch
  10.         .PROC
  11.         .CALLINFO
  12.         .ENTRY
  13.     ; store old registers
  14.     STW    %sp,0(%arg0)
  15.     ; not used: 4(%arg0)
  16.     STW    %rp,8(%arg0)
  17.     STW    %r3,12(%arg0)
  18.     STW    %r4,16(%arg0)
  19.     STW    %r5,20(%arg0)
  20.     STW    %r6,24(%arg0)
  21.     STW    %r7,28(%arg0)
  22.     STW    %r8,32(%arg0)
  23.     STW    %r9,36(%arg0)
  24.     STW    %r10,40(%arg0)
  25.     STW    %r11,44(%arg0)
  26.     STW    %r12,48(%arg0)
  27.     STW    %r13,52(%arg0)
  28.     STW    %r14,56(%arg0)
  29.     STW    %r15,60(%arg0)
  30.     STW    %r16,64(%arg0)
  31.     STW    %r17,68(%arg0)
  32.     STW    %r18,72(%arg0)
  33.  
  34.         COMIB,=,N      0,%arg2,L$isfirst
  35.  
  36.     ; this is not a first-time call; reload old context
  37.     LDW    0(%arg1),%sp
  38.     LDW    8(%arg1),%rp
  39.     LDW    12(%arg1),%r3
  40.     LDW    16(%arg1),%r4
  41.     LDW    20(%arg1),%r5
  42.     LDW    24(%arg1),%r6
  43.     LDW    28(%arg1),%r7
  44.     LDW    32(%arg1),%r8
  45.     LDW    36(%arg1),%r9
  46.     LDW    40(%arg1),%r10
  47.     LDW    44(%arg1),%r11
  48.     LDW    48(%arg1),%r12
  49.     LDW    52(%arg1),%r13
  50.     LDW    56(%arg1),%r14
  51.     LDW    60(%arg1),%r15
  52.     LDW    64(%arg1),%r16
  53.     LDW    68(%arg1),%r17
  54.     LDW    72(%arg1),%r18
  55.     BV,N    (%rp)            ; return
  56.  
  57. L$isfirst
  58.     LDW    0(%arg1),%sp
  59.     LDI    0,%arg0
  60.     LDI    0,%arg1
  61.         .CALL   ARGW0=GR,ARGW1=GR
  62.     BL,N    new_context,%rp        ; call new_context(0,0)
  63.     SUBI    1,%r0,%rp
  64.     BV,N    (%rp)            ; abort w/ illegal jump
  65.         .EXIT
  66.         .PROCEND 
  67.         .IMPORT new_context,CODE
  68.         .END
  69.