mips_mach_dep.s
上传用户:nthfjj
上传日期:2007-01-07
资源大小:37k
文件大小:3k
源码类别:

系统编程

开发平台:

Unix_Linux

  1. # define call_mark(x)     move    $4,x;    jal     tl_mark
  2.  # Mark from machine registers that are saved by C compiler
  3.     .globl  mark_regs
  4.     .ent    mark_regs
  5. mark_regs:
  6.     subu    $sp,4       ## Need to save only return address
  7.     sw      $31,4($sp)
  8.     .mask   0x80000000,0
  9.     .frame  $sp,4,$31
  10.     call_mark($2)
  11.     call_mark($3)
  12.     call_mark($16)
  13.     call_mark($17)
  14.     call_mark($18)
  15.     call_mark($19)
  16.     call_mark($20)
  17.     call_mark($21)
  18.     call_mark($22)
  19.     call_mark($23)
  20.     call_mark($30)
  21.     lw      $31,4($sp)
  22.     addu    $sp,4
  23.     j       $31
  24.     .end    mark_regs
  25.     .globl  allocobj
  26.     .ent    allocobj
  27. allocobj:
  28.     subu    $sp,68
  29.     sw      $31,68($sp)
  30.     sw      $25,64($sp)
  31.     sw      $24,60($sp)
  32.     sw      $15,56($sp)
  33.     sw      $14,52($sp)
  34.     sw      $13,48($sp)
  35.     sw      $12,44($sp)
  36.     sw      $11,40($sp)
  37.     sw      $10,36($sp)
  38.     sw      $9,32($sp)
  39.     sw      $8,28($sp)
  40.     sw      $7,24($sp)
  41.     sw      $6,20($sp)
  42.     sw      $5,16($sp)
  43.     sw      $4,12($sp)
  44.     sw      $3,8($sp)
  45.     .set    noat
  46.     sw      $at,4($sp)
  47.     .set    at
  48.     .mask   0x8300fffa,0
  49.     .frame  $sp,68,$31
  50.     jal     _allocobj
  51.     lw      $31,68($sp)
  52.     lw      $25,64($sp)
  53.     lw      $24,60($sp)
  54.     lw      $15,56($sp)
  55.     lw      $14,52($sp)
  56.     lw      $13,48($sp)
  57.     lw      $12,44($sp)
  58.     lw      $11,40($sp)
  59.     lw      $10,36($sp)
  60.     lw      $9,32($sp)
  61.     lw      $8,28($sp)
  62.     lw      $7,24($sp)
  63.     lw      $6,20($sp)
  64.     lw      $5,16($sp)
  65.     lw      $4,12($sp)
  66.     lw      $3,8($sp)
  67.  #  don't restore $2, since it's the return value
  68.     .set    noat
  69.     lw      $at,4($sp)
  70.     .set    at
  71.     addu    $sp,68
  72.     j       $31
  73.     .end    allocobj
  74.     .globl  allocaobj
  75.     .ent    allocaobj
  76. allocaobj:
  77.     subu    $sp,68
  78.     sw      $31,68($sp)
  79.     sw      $25,64($sp)
  80.     sw      $24,60($sp)
  81.     sw      $15,56($sp)
  82.     sw      $14,52($sp)
  83.     sw      $13,48($sp)
  84.     sw      $12,44($sp)
  85.     sw      $11,40($sp)
  86.     sw      $10,36($sp)
  87.     sw      $9,32($sp)
  88.     sw      $8,28($sp)
  89.     sw      $7,24($sp)
  90.     sw      $6,20($sp)
  91.     sw      $5,16($sp)
  92.     sw      $4,12($sp)
  93.     sw      $3,8($sp)
  94.     .set    noat
  95.     sw      $at,4($sp)
  96.     .set    at
  97.     .mask   0x8300fffa,0
  98.     .frame  $sp,68,$31
  99.     jal     _allocaobj
  100.     lw      $31,68($sp)
  101.     lw      $25,64($sp)
  102.     lw      $24,60($sp)
  103.     lw      $15,56($sp)
  104.     lw      $14,52($sp)
  105.     lw      $13,48($sp)
  106.     lw      $12,44($sp)
  107.     lw      $11,40($sp)
  108.     lw      $10,36($sp)
  109.     lw      $9,32($sp)
  110.     lw      $8,28($sp)
  111.     lw      $7,24($sp)
  112.     lw      $6,20($sp)
  113.     lw      $5,16($sp)
  114.     lw      $4,12($sp)
  115.     lw      $3,8($sp)
  116.  #  don't restore $2, since it's the return value
  117.     .set    noat
  118.     lw      $at,4($sp)
  119.     .set    at
  120.     addu    $sp,68
  121.     j       $31
  122.     .end    allocaobj