emuIncALib.s
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* Copyright 1991-2001 Wind River Systems, Inc. */
  2. # modification history
  3. # --------------------
  4. # 01b,07may99,tdl  changed multiline /* */ comment to #
  5. # 01a,24jan95,hdn  original US Software version.
  6. # ***** These are the configuration parameters: *****
  7. #       see below for explanation
  8. EXIRNO = 16 #interrupt number for exceptions
  9. #EXIRNO = 2 #interrupt number for exceptions
  10. ENIRS  = 0x44f6 #enable interrupts
  11. #ENIRS  = 0x06eb #skip enabling interrupts
  12. ADDSIZ = 4 #return address bytes
  13. # interrupt number for exceptions
  14. # This should really always be 16 because that is what the floating-point chip
  15. # uses.  Unfortunately the PC does some funny things to this, both in hardware
  16. # and in software.  It appears that 2 works in some cases.  This is of course
  17. # really NMI.
  18. #        .386P
  19. # offset definitions in the stack frame
  20. s_len = 72 #frame size 
  21. s_fr = s_len+40 #user flag register
  22. s_cs = s_len+36 #user instruction pointer
  23. s_ip = s_len+32
  24. s_ax = s_len+28 #pushed registers
  25. s_cx = s_len+24
  26. s_dx = s_len+20
  27. s_bx = s_len+16
  28. s_sp = s_len+12
  29. s_bp = s_len+8
  30. s_si = s_len+4
  31. s_di = s_len
  32. s_ds = s_len-4
  33. s_es = s_len-8
  34. s_0 = 0
  35. iptr = 4
  36. memptr = 8
  37. index = 12
  38. rmcode = 16
  39. opcode = 20
  40. flag = 24
  41. s_A = 28
  42. s_B = 40
  43. s_X = 48
  44. # exponent bias for the three floating-point types
  45. sBIAS = 0x7f
  46. lBIAS = 0x3ff
  47. tBIAS = 0x3fff
  48. # exception definitions
  49. stacku = 0x41 #stack underflow
  50. stacko = 0x241 #stack overflow
  51. precis = 0x20 #precision
  52. underf = 0x10 #underflow
  53. overf = 0x08 #overflow
  54. zerod = 0x04 #zero divide
  55. denorm = 0x02 #denormal operand
  56. invop = 0x01 #invalid operation
  57. rup = 0x200 #rounded up
  58. # macro to load EP number
  59. # macro to store EP number
  60. # macro to save instruction information
  61. # stack pointer macros
  62. # macro to handle precision exception