assembly.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 1999 Hewlett-Packard (Frank Rowand)
  4. * Copyright (C) 1999 Philipp Rumpf <[email protected]>
  5. * Copyright (C) 1999 SuSE GmbH
  6. * Copyright (C) 2021 Helge Deller <[email protected]>
  7. */
  8. #ifndef _PARISC_ASSEMBLY_H
  9. #define _PARISC_ASSEMBLY_H
  10. #ifdef CONFIG_64BIT
  11. #define RP_OFFSET 16
  12. #define FRAME_SIZE 128
  13. #define CALLEE_REG_FRAME_SIZE 144
  14. #define REG_SZ 8
  15. #define ASM_ULONG_INSN .dword
  16. #else /* CONFIG_64BIT */
  17. #define RP_OFFSET 20
  18. #define FRAME_SIZE 64
  19. #define CALLEE_REG_FRAME_SIZE 128
  20. #define REG_SZ 4
  21. #define ASM_ULONG_INSN .word
  22. #endif
  23. /* Frame alignment for 32- and 64-bit */
  24. #define FRAME_ALIGN 64
  25. #define CALLEE_FLOAT_FRAME_SIZE 80
  26. #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
  27. #ifdef CONFIG_PA20
  28. #define LDCW ldcw,co
  29. #define BL b,l
  30. # ifdef CONFIG_64BIT
  31. # define PA_ASM_LEVEL 2.0w
  32. # else
  33. # define PA_ASM_LEVEL 2.0
  34. # endif
  35. #else
  36. #define LDCW ldcw
  37. #define BL bl
  38. #define PA_ASM_LEVEL 1.1
  39. #endif
  40. /* Privilege level field in the rightmost two bits of the IA queues */
  41. #define PRIV_USER 3
  42. #define PRIV_KERNEL 0
  43. /* Space register used inside kernel */
  44. #define SR_KERNEL 0
  45. #define SR_TEMP1 1
  46. #define SR_TEMP2 2
  47. #define SR_USER 3
  48. #ifdef __ASSEMBLY__
  49. #ifdef CONFIG_64BIT
  50. #define LDREG ldd
  51. #define STREG std
  52. #define LDREGX ldd,s
  53. #define LDREGM ldd,mb
  54. #define STREGM std,ma
  55. #define SHRREG shrd
  56. #define SHLREG shld
  57. #define ANDCM andcm,*
  58. #define COND(x) * ## x
  59. #else /* CONFIG_64BIT */
  60. #define LDREG ldw
  61. #define STREG stw
  62. #define LDREGX ldwx,s
  63. #define LDREGM ldwm
  64. #define STREGM stwm
  65. #define SHRREG shr
  66. #define SHLREG shlw
  67. #define ANDCM andcm
  68. #define COND(x) x
  69. #endif
  70. #ifdef CONFIG_64BIT
  71. /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so
  72. * work around that for now... */
  73. .level 2.0w
  74. #endif
  75. #include <asm/asm-offsets.h>
  76. #include <asm/page.h>
  77. #include <asm/types.h>
  78. #include <asm/asmregs.h>
  79. #include <asm/psw.h>
  80. /*
  81. * We provide two versions of each macro to convert from physical
  82. * to virtual and vice versa. The "_r1" versions take one argument
  83. * register, but trashes r1 to do the conversion. The other
  84. * version takes two arguments: a src and destination register.
  85. * However, the source and destination registers can not be
  86. * the same register.
  87. */
  88. .macro tophys grvirt, grphys
  89. ldil L%(__PAGE_OFFSET), \grphys
  90. sub \grvirt, \grphys, \grphys
  91. .endm
  92. .macro tovirt grphys, grvirt
  93. ldil L%(__PAGE_OFFSET), \grvirt
  94. add \grphys, \grvirt, \grvirt
  95. .endm
  96. .macro tophys_r1 gr
  97. ldil L%(__PAGE_OFFSET), %r1
  98. sub \gr, %r1, \gr
  99. .endm
  100. .macro tovirt_r1 gr
  101. ldil L%(__PAGE_OFFSET), %r1
  102. add \gr, %r1, \gr
  103. .endm
  104. .macro delay value
  105. ldil L%\value, 1
  106. ldo R%\value(1), 1
  107. addib,UV,n -1,1,.
  108. addib,NUV,n -1,1,.+8
  109. nop
  110. .endm
  111. .macro debug value
  112. .endm
  113. .macro shlw r, sa, t
  114. zdep \r, 31-(\sa), 32-(\sa), \t
  115. .endm
  116. /* And the PA 2.0W shift left */
  117. .macro shld r, sa, t
  118. depd,z \r, 63-(\sa), 64-(\sa), \t
  119. .endm
  120. /* Shift Right for 32-bit. Clobbers upper 32-bit on PA2.0. */
  121. .macro shr r, sa, t
  122. extru \r, 31-(\sa), 32-(\sa), \t
  123. .endm
  124. /* pa20w version of shift right */
  125. .macro shrd r, sa, t
  126. extrd,u \r, 63-(\sa), 64-(\sa), \t
  127. .endm
  128. /* Extract unsigned for 32- and 64-bit
  129. * The extru instruction leaves the most significant 32 bits of the
  130. * target register in an undefined state on PA 2.0 systems. */
  131. .macro extru_safe r, p, len, t
  132. #ifdef CONFIG_64BIT
  133. extrd,u \r, 32+(\p), \len, \t
  134. #else
  135. extru \r, \p, \len, \t
  136. #endif
  137. .endm
  138. /* The depi instruction leaves the most significant 32 bits of the
  139. * target register in an undefined state on PA 2.0 systems. */
  140. .macro depi_safe i, p, len, t
  141. #ifdef CONFIG_64BIT
  142. depdi \i, 32+(\p), \len, \t
  143. #else
  144. depi \i, \p, \len, \t
  145. #endif
  146. .endm
  147. /* The depw instruction leaves the most significant 32 bits of the
  148. * target register in an undefined state on PA 2.0 systems. */
  149. .macro dep_safe i, p, len, t
  150. #ifdef CONFIG_64BIT
  151. depd \i, 32+(\p), \len, \t
  152. #else
  153. depw \i, \p, \len, \t
  154. #endif
  155. .endm
  156. /* load 32-bit 'value' into 'reg' compensating for the ldil
  157. * sign-extension when running in wide mode.
  158. * WARNING!! neither 'value' nor 'reg' can be expressions
  159. * containing '.'!!!! */
  160. .macro load32 value, reg
  161. ldil L%\value, \reg
  162. ldo R%\value(\reg), \reg
  163. .endm
  164. .macro loadgp
  165. #ifdef CONFIG_64BIT
  166. ldil L%__gp, %r27
  167. ldo R%__gp(%r27), %r27
  168. #else
  169. ldil L%$global$, %r27
  170. ldo R%$global$(%r27), %r27
  171. #endif
  172. .endm
  173. #define SAVE_SP(r, where) mfsp r, %r1 ! STREG %r1, where
  174. #define REST_SP(r, where) LDREG where, %r1 ! mtsp %r1, r
  175. #define SAVE_CR(r, where) mfctl r, %r1 ! STREG %r1, where
  176. #define REST_CR(r, where) LDREG where, %r1 ! mtctl %r1, r
  177. .macro save_general regs
  178. STREG %r1, PT_GR1 (\regs)
  179. STREG %r2, PT_GR2 (\regs)
  180. STREG %r3, PT_GR3 (\regs)
  181. STREG %r4, PT_GR4 (\regs)
  182. STREG %r5, PT_GR5 (\regs)
  183. STREG %r6, PT_GR6 (\regs)
  184. STREG %r7, PT_GR7 (\regs)
  185. STREG %r8, PT_GR8 (\regs)
  186. STREG %r9, PT_GR9 (\regs)
  187. STREG %r10, PT_GR10(\regs)
  188. STREG %r11, PT_GR11(\regs)
  189. STREG %r12, PT_GR12(\regs)
  190. STREG %r13, PT_GR13(\regs)
  191. STREG %r14, PT_GR14(\regs)
  192. STREG %r15, PT_GR15(\regs)
  193. STREG %r16, PT_GR16(\regs)
  194. STREG %r17, PT_GR17(\regs)
  195. STREG %r18, PT_GR18(\regs)
  196. STREG %r19, PT_GR19(\regs)
  197. STREG %r20, PT_GR20(\regs)
  198. STREG %r21, PT_GR21(\regs)
  199. STREG %r22, PT_GR22(\regs)
  200. STREG %r23, PT_GR23(\regs)
  201. STREG %r24, PT_GR24(\regs)
  202. STREG %r25, PT_GR25(\regs)
  203. /* r26 is saved in get_stack and used to preserve a value across virt_map */
  204. STREG %r27, PT_GR27(\regs)
  205. STREG %r28, PT_GR28(\regs)
  206. /* r29 is saved in get_stack and used to point to saved registers */
  207. /* r30 stack pointer saved in get_stack */
  208. STREG %r31, PT_GR31(\regs)
  209. .endm
  210. .macro rest_general regs
  211. /* r1 used as a temp in rest_stack and is restored there */
  212. LDREG PT_GR2 (\regs), %r2
  213. LDREG PT_GR3 (\regs), %r3
  214. LDREG PT_GR4 (\regs), %r4
  215. LDREG PT_GR5 (\regs), %r5
  216. LDREG PT_GR6 (\regs), %r6
  217. LDREG PT_GR7 (\regs), %r7
  218. LDREG PT_GR8 (\regs), %r8
  219. LDREG PT_GR9 (\regs), %r9
  220. LDREG PT_GR10(\regs), %r10
  221. LDREG PT_GR11(\regs), %r11
  222. LDREG PT_GR12(\regs), %r12
  223. LDREG PT_GR13(\regs), %r13
  224. LDREG PT_GR14(\regs), %r14
  225. LDREG PT_GR15(\regs), %r15
  226. LDREG PT_GR16(\regs), %r16
  227. LDREG PT_GR17(\regs), %r17
  228. LDREG PT_GR18(\regs), %r18
  229. LDREG PT_GR19(\regs), %r19
  230. LDREG PT_GR20(\regs), %r20
  231. LDREG PT_GR21(\regs), %r21
  232. LDREG PT_GR22(\regs), %r22
  233. LDREG PT_GR23(\regs), %r23
  234. LDREG PT_GR24(\regs), %r24
  235. LDREG PT_GR25(\regs), %r25
  236. LDREG PT_GR26(\regs), %r26
  237. LDREG PT_GR27(\regs), %r27
  238. LDREG PT_GR28(\regs), %r28
  239. /* r29 points to register save area, and is restored in rest_stack */
  240. /* r30 stack pointer restored in rest_stack */
  241. LDREG PT_GR31(\regs), %r31
  242. .endm
  243. .macro save_fp regs
  244. fstd,ma %fr0, 8(\regs)
  245. fstd,ma %fr1, 8(\regs)
  246. fstd,ma %fr2, 8(\regs)
  247. fstd,ma %fr3, 8(\regs)
  248. fstd,ma %fr4, 8(\regs)
  249. fstd,ma %fr5, 8(\regs)
  250. fstd,ma %fr6, 8(\regs)
  251. fstd,ma %fr7, 8(\regs)
  252. fstd,ma %fr8, 8(\regs)
  253. fstd,ma %fr9, 8(\regs)
  254. fstd,ma %fr10, 8(\regs)
  255. fstd,ma %fr11, 8(\regs)
  256. fstd,ma %fr12, 8(\regs)
  257. fstd,ma %fr13, 8(\regs)
  258. fstd,ma %fr14, 8(\regs)
  259. fstd,ma %fr15, 8(\regs)
  260. fstd,ma %fr16, 8(\regs)
  261. fstd,ma %fr17, 8(\regs)
  262. fstd,ma %fr18, 8(\regs)
  263. fstd,ma %fr19, 8(\regs)
  264. fstd,ma %fr20, 8(\regs)
  265. fstd,ma %fr21, 8(\regs)
  266. fstd,ma %fr22, 8(\regs)
  267. fstd,ma %fr23, 8(\regs)
  268. fstd,ma %fr24, 8(\regs)
  269. fstd,ma %fr25, 8(\regs)
  270. fstd,ma %fr26, 8(\regs)
  271. fstd,ma %fr27, 8(\regs)
  272. fstd,ma %fr28, 8(\regs)
  273. fstd,ma %fr29, 8(\regs)
  274. fstd,ma %fr30, 8(\regs)
  275. fstd %fr31, 0(\regs)
  276. .endm
  277. .macro rest_fp regs
  278. fldd 0(\regs), %fr31
  279. fldd,mb -8(\regs), %fr30
  280. fldd,mb -8(\regs), %fr29
  281. fldd,mb -8(\regs), %fr28
  282. fldd,mb -8(\regs), %fr27
  283. fldd,mb -8(\regs), %fr26
  284. fldd,mb -8(\regs), %fr25
  285. fldd,mb -8(\regs), %fr24
  286. fldd,mb -8(\regs), %fr23
  287. fldd,mb -8(\regs), %fr22
  288. fldd,mb -8(\regs), %fr21
  289. fldd,mb -8(\regs), %fr20
  290. fldd,mb -8(\regs), %fr19
  291. fldd,mb -8(\regs), %fr18
  292. fldd,mb -8(\regs), %fr17
  293. fldd,mb -8(\regs), %fr16
  294. fldd,mb -8(\regs), %fr15
  295. fldd,mb -8(\regs), %fr14
  296. fldd,mb -8(\regs), %fr13
  297. fldd,mb -8(\regs), %fr12
  298. fldd,mb -8(\regs), %fr11
  299. fldd,mb -8(\regs), %fr10
  300. fldd,mb -8(\regs), %fr9
  301. fldd,mb -8(\regs), %fr8
  302. fldd,mb -8(\regs), %fr7
  303. fldd,mb -8(\regs), %fr6
  304. fldd,mb -8(\regs), %fr5
  305. fldd,mb -8(\regs), %fr4
  306. fldd,mb -8(\regs), %fr3
  307. fldd,mb -8(\regs), %fr2
  308. fldd,mb -8(\regs), %fr1
  309. fldd,mb -8(\regs), %fr0
  310. .endm
  311. .macro callee_save_float
  312. fstd,ma %fr12, 8(%r30)
  313. fstd,ma %fr13, 8(%r30)
  314. fstd,ma %fr14, 8(%r30)
  315. fstd,ma %fr15, 8(%r30)
  316. fstd,ma %fr16, 8(%r30)
  317. fstd,ma %fr17, 8(%r30)
  318. fstd,ma %fr18, 8(%r30)
  319. fstd,ma %fr19, 8(%r30)
  320. fstd,ma %fr20, 8(%r30)
  321. fstd,ma %fr21, 8(%r30)
  322. .endm
  323. .macro callee_rest_float
  324. fldd,mb -8(%r30), %fr21
  325. fldd,mb -8(%r30), %fr20
  326. fldd,mb -8(%r30), %fr19
  327. fldd,mb -8(%r30), %fr18
  328. fldd,mb -8(%r30), %fr17
  329. fldd,mb -8(%r30), %fr16
  330. fldd,mb -8(%r30), %fr15
  331. fldd,mb -8(%r30), %fr14
  332. fldd,mb -8(%r30), %fr13
  333. fldd,mb -8(%r30), %fr12
  334. .endm
  335. #ifdef CONFIG_64BIT
  336. .macro callee_save
  337. std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30)
  338. mfctl %cr27, %r3
  339. std %r4, -136(%r30)
  340. std %r5, -128(%r30)
  341. std %r6, -120(%r30)
  342. std %r7, -112(%r30)
  343. std %r8, -104(%r30)
  344. std %r9, -96(%r30)
  345. std %r10, -88(%r30)
  346. std %r11, -80(%r30)
  347. std %r12, -72(%r30)
  348. std %r13, -64(%r30)
  349. std %r14, -56(%r30)
  350. std %r15, -48(%r30)
  351. std %r16, -40(%r30)
  352. std %r17, -32(%r30)
  353. std %r18, -24(%r30)
  354. std %r3, -16(%r30)
  355. .endm
  356. .macro callee_rest
  357. ldd -16(%r30), %r3
  358. ldd -24(%r30), %r18
  359. ldd -32(%r30), %r17
  360. ldd -40(%r30), %r16
  361. ldd -48(%r30), %r15
  362. ldd -56(%r30), %r14
  363. ldd -64(%r30), %r13
  364. ldd -72(%r30), %r12
  365. ldd -80(%r30), %r11
  366. ldd -88(%r30), %r10
  367. ldd -96(%r30), %r9
  368. ldd -104(%r30), %r8
  369. ldd -112(%r30), %r7
  370. ldd -120(%r30), %r6
  371. ldd -128(%r30), %r5
  372. ldd -136(%r30), %r4
  373. mtctl %r3, %cr27
  374. ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3
  375. .endm
  376. #else /* ! CONFIG_64BIT */
  377. .macro callee_save
  378. stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30)
  379. mfctl %cr27, %r3
  380. stw %r4, -124(%r30)
  381. stw %r5, -120(%r30)
  382. stw %r6, -116(%r30)
  383. stw %r7, -112(%r30)
  384. stw %r8, -108(%r30)
  385. stw %r9, -104(%r30)
  386. stw %r10, -100(%r30)
  387. stw %r11, -96(%r30)
  388. stw %r12, -92(%r30)
  389. stw %r13, -88(%r30)
  390. stw %r14, -84(%r30)
  391. stw %r15, -80(%r30)
  392. stw %r16, -76(%r30)
  393. stw %r17, -72(%r30)
  394. stw %r18, -68(%r30)
  395. stw %r3, -64(%r30)
  396. .endm
  397. .macro callee_rest
  398. ldw -64(%r30), %r3
  399. ldw -68(%r30), %r18
  400. ldw -72(%r30), %r17
  401. ldw -76(%r30), %r16
  402. ldw -80(%r30), %r15
  403. ldw -84(%r30), %r14
  404. ldw -88(%r30), %r13
  405. ldw -92(%r30), %r12
  406. ldw -96(%r30), %r11
  407. ldw -100(%r30), %r10
  408. ldw -104(%r30), %r9
  409. ldw -108(%r30), %r8
  410. ldw -112(%r30), %r7
  411. ldw -116(%r30), %r6
  412. ldw -120(%r30), %r5
  413. ldw -124(%r30), %r4
  414. mtctl %r3, %cr27
  415. ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3
  416. .endm
  417. #endif /* ! CONFIG_64BIT */
  418. .macro save_specials regs
  419. SAVE_SP (%sr0, PT_SR0 (\regs))
  420. SAVE_SP (%sr1, PT_SR1 (\regs))
  421. SAVE_SP (%sr2, PT_SR2 (\regs))
  422. SAVE_SP (%sr3, PT_SR3 (\regs))
  423. SAVE_SP (%sr4, PT_SR4 (\regs))
  424. SAVE_SP (%sr5, PT_SR5 (\regs))
  425. SAVE_SP (%sr6, PT_SR6 (\regs))
  426. SAVE_CR (%cr17, PT_IASQ0(\regs))
  427. mtctl %r0, %cr17
  428. SAVE_CR (%cr17, PT_IASQ1(\regs))
  429. SAVE_CR (%cr18, PT_IAOQ0(\regs))
  430. mtctl %r0, %cr18
  431. SAVE_CR (%cr18, PT_IAOQ1(\regs))
  432. #ifdef CONFIG_64BIT
  433. /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0
  434. * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only
  435. * reads 5 bits. Use mfctl,w to read all six bits. Otherwise
  436. * we lose the 6th bit on a save/restore over interrupt.
  437. */
  438. mfctl,w %cr11, %r1
  439. STREG %r1, PT_SAR (\regs)
  440. #else
  441. SAVE_CR (%cr11, PT_SAR (\regs))
  442. #endif
  443. SAVE_CR (%cr19, PT_IIR (\regs))
  444. /*
  445. * Code immediately following this macro (in intr_save) relies
  446. * on r8 containing ipsw.
  447. */
  448. mfctl %cr22, %r8
  449. STREG %r8, PT_PSW(\regs)
  450. .endm
  451. .macro rest_specials regs
  452. REST_SP (%sr0, PT_SR0 (\regs))
  453. REST_SP (%sr1, PT_SR1 (\regs))
  454. REST_SP (%sr2, PT_SR2 (\regs))
  455. REST_SP (%sr3, PT_SR3 (\regs))
  456. REST_SP (%sr4, PT_SR4 (\regs))
  457. REST_SP (%sr5, PT_SR5 (\regs))
  458. REST_SP (%sr6, PT_SR6 (\regs))
  459. REST_SP (%sr7, PT_SR7 (\regs))
  460. REST_CR (%cr17, PT_IASQ0(\regs))
  461. REST_CR (%cr17, PT_IASQ1(\regs))
  462. REST_CR (%cr18, PT_IAOQ0(\regs))
  463. REST_CR (%cr18, PT_IAOQ1(\regs))
  464. REST_CR (%cr11, PT_SAR (\regs))
  465. REST_CR (%cr22, PT_PSW (\regs))
  466. .endm
  467. /* First step to create a "relied upon translation"
  468. * See PA 2.0 Arch. page F-4 and F-5.
  469. *
  470. * The ssm was originally necessary due to a "PCxT bug".
  471. * But someone decided it needed to be added to the architecture
  472. * and this "feature" went into rev3 of PA-RISC 1.1 Arch Manual.
  473. * It's been carried forward into PA 2.0 Arch as well. :^(
  474. *
  475. * "ssm 0,%r0" is a NOP with side effects (prefetch barrier).
  476. * rsm/ssm prevents the ifetch unit from speculatively fetching
  477. * instructions past this line in the code stream.
  478. * PA 2.0 processor will single step all insn in the same QUAD (4 insn).
  479. */
  480. .macro pcxt_ssm_bug
  481. rsm PSW_SM_I,%r0
  482. nop /* 1 */
  483. nop /* 2 */
  484. nop /* 3 */
  485. nop /* 4 */
  486. nop /* 5 */
  487. nop /* 6 */
  488. nop /* 7 */
  489. .endm
  490. /* Switch to virtual mapping, trashing only %r1 */
  491. .macro virt_map
  492. /* pcxt_ssm_bug */
  493. rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */
  494. mtsp %r0, %sr4
  495. mtsp %r0, %sr5
  496. mtsp %r0, %sr6
  497. tovirt_r1 %r29
  498. load32 KERNEL_PSW, %r1
  499. rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */
  500. mtctl %r0, %cr17 /* Clear IIASQ tail */
  501. mtctl %r0, %cr17 /* Clear IIASQ head */
  502. mtctl %r1, %ipsw
  503. load32 4f, %r1
  504. mtctl %r1, %cr18 /* Set IIAOQ tail */
  505. ldo 4(%r1), %r1
  506. mtctl %r1, %cr18 /* Set IIAOQ head */
  507. rfir
  508. nop
  509. 4:
  510. .endm
  511. /*
  512. * ASM_EXCEPTIONTABLE_ENTRY
  513. *
  514. * Creates an exception table entry.
  515. * Do not convert to a assembler macro. This won't work.
  516. */
  517. #define ASM_EXCEPTIONTABLE_ENTRY(fault_addr, except_addr) \
  518. .section __ex_table,"aw" ! \
  519. .align 4 ! \
  520. .word (fault_addr - .), (except_addr - .) ! \
  521. .previous
  522. #endif /* __ASSEMBLY__ */
  523. #endif