prefix.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* $OpenBSD: prefix.h,v 1.2 2001/03/29 04:08:21 mickey Exp $ */
  2. /*
  3. * (c) Copyright 1985 HEWLETT-PACKARD COMPANY
  4. *
  5. * To anyone who acknowledges that this file is provided "AS IS"
  6. * without any express or implied warranty:
  7. * permission to use, copy, modify, and distribute this file
  8. * for any purpose is hereby granted without fee, provided that
  9. * the above copyright notice and this notice appears in all
  10. * copies, and that the name of Hewlett-Packard Company not be
  11. * used in advertising or publicity pertaining to distribution
  12. * of the software without specific, written prior permission.
  13. * Hewlett-Packard Company makes no representations about the
  14. * suitability of this software for any purpose.
  15. */
  16. /*
  17. * STANDARD INCLUDE FILE FOR MILLICODE
  18. * Every source file must include this file.
  19. *
  20. * Hardware General Registers
  21. *
  22. * Frame Offsets (millicode convention!)
  23. * Used when calling other millicode routines.
  24. * Stack unwinding is dependent upon these definitions.
  25. * r31_slot .equ -20
  26. * sr0_slot .equ -16
  27. */
  28. #include <machine/asm.h>
  29. #define DEFINE(name, value)name: .EQU value
  30. #ifdef milliext
  31. #ifdef PIC
  32. #define MILLI_BE(lbl) \
  33. BL .+8,r1\
  34. ! ADDIL L%lbl-labl/**/lbl,r1\
  35. ! .LABEL labl/**/lbl\
  36. ! BE R%lbl-labl/**/lbl(sr7,r1)
  37. #define MILLI_BEN(lbl) \
  38. BL .+8,r1\
  39. ! ADDIL L%lbl-labl/**/lbl,r1\
  40. ! .LABEL labl/**/lbl\
  41. ! BE,N R%lbl-labl/**/lbl(sr7,r1)
  42. #define MILLI_BLE(lbl) \
  43. BL .+8,r1\
  44. ! ADDIL L%lbl-labl/**/lbl,r1\
  45. ! .LABEL labl/**/lbl \
  46. ! BLE R%lbl-labl/**/lbl(sr7,r1)
  47. #define MILLI_BLEN(lbl) \
  48. BL .+8,r1\
  49. ! ADDIL L%lbl-labl/**/lbl,r1\
  50. ! .LABEL labl/**/lbl\
  51. ! BLE,N R%lbl-labl/**/lbl(sr7,r1)
  52. #else
  53. #define MILLI_BE(lbl) BE lbl(sr7,r0)
  54. #define MILLI_BEN(lbl) BE,n lbl(sr7,r0)
  55. #define MILLI_BLE(lbl) BLE lbl(sr7,r0)
  56. #define MILLI_BLEN(lbl) BLE,n lbl(sr7,r0)
  57. #endif
  58. #define MILLIRETN BE,n 0(sr0,r31)
  59. #define MILLIRET BE 0(sr0,r31)
  60. #define MILLI_RETN BE,n 0(sr0,r31)
  61. #define MILLI_RET BE 0(sr0,r31)
  62. #else
  63. #define MILLI_BE(lbl) B lbl
  64. #define MILLI_BEN(lbl) B,n lbl
  65. #define MILLI_BLE(lbl) BL lbl,r31
  66. #define MILLI_BLEN(lbl) BL,n lbl,r31
  67. #define MILLIRETN BV,n 0(r31)
  68. #define MILLIRET BV 0(r31)
  69. #define MILLI_RETN BV,n 0(r31)
  70. #define MILLI_RET BV 0(r31)
  71. #endif
  72. ; VERSION is used wherever ".version" can appear in a routine
  73. ;#define VERSION .version
  74. #define VERSION ;