math.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. /*
  2. * arch/sh/math-emu/math.c
  3. *
  4. * Copyright (C) 2006 Takashi YOSHII <takasi-y@ops.dti.ne.jp>
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/errno.h>
  12. #include <linux/types.h>
  13. #include <linux/sched.h>
  14. #include <linux/signal.h>
  15. #include <linux/perf_event.h>
  16. #include <asm/system.h>
  17. #include <asm/uaccess.h>
  18. #include <asm/processor.h>
  19. #include <asm/io.h>
  20. #include "sfp-util.h"
  21. #include <math-emu/soft-fp.h>
  22. #include <math-emu/single.h>
  23. #include <math-emu/double.h>
  24. #define FPUL (fregs->fpul)
  25. #define FPSCR (fregs->fpscr)
  26. #define FPSCR_RM (FPSCR&3)
  27. #define FPSCR_DN ((FPSCR>>18)&1)
  28. #define FPSCR_PR ((FPSCR>>19)&1)
  29. #define FPSCR_SZ ((FPSCR>>20)&1)
  30. #define FPSCR_FR ((FPSCR>>21)&1)
  31. #define FPSCR_MASK 0x003fffffUL
  32. #define BANK(n) (n^(FPSCR_FR?16:0))
  33. #define FR ((unsigned long*)(fregs->fp_regs))
  34. #define FR0 (FR[BANK(0)])
  35. #define FRn (FR[BANK(n)])
  36. #define FRm (FR[BANK(m)])
  37. #define DR ((unsigned long long*)(fregs->fp_regs))
  38. #define DRn (DR[BANK(n)/2])
  39. #define DRm (DR[BANK(m)/2])
  40. #define XREG(n) (n^16)
  41. #define XFn (FR[BANK(XREG(n))])
  42. #define XFm (FR[BANK(XREG(m))])
  43. #define XDn (DR[BANK(XREG(n))/2])
  44. #define XDm (DR[BANK(XREG(m))/2])
  45. #define R0 (regs->regs[0])
  46. #define Rn (regs->regs[n])
  47. #define Rm (regs->regs[m])
  48. #define WRITE(d,a) ({if(put_user(d, (typeof (d)*)a)) return -EFAULT;})
  49. #define READ(d,a) ({if(get_user(d, (typeof (d)*)a)) return -EFAULT;})
  50. #define PACK_S(r,f) FP_PACK_SP(&r,f)
  51. #define UNPACK_S(f,r) FP_UNPACK_SP(f,&r)
  52. #define PACK_D(r,f) \
  53. {u32 t[2]; FP_PACK_DP(t,f); ((u32*)&r)[0]=t[1]; ((u32*)&r)[1]=t[0];}
  54. #define UNPACK_D(f,r) \
  55. {u32 t[2]; t[0]=((u32*)&r)[1]; t[1]=((u32*)&r)[0]; FP_UNPACK_DP(f,t);}
  56. // 2 args instructions.
  57. #define BOTH_PRmn(op,x) \
  58. FP_DECL_EX; if(FPSCR_PR) op(D,x,DRm,DRn); else op(S,x,FRm,FRn);
  59. #define CMP_X(SZ,R,M,N) do{ \
  60. FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); \
  61. UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \
  62. FP_CMP_##SZ(R, Fn, Fm, 2); }while(0)
  63. #define EQ_X(SZ,R,M,N) do{ \
  64. FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); \
  65. UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \
  66. FP_CMP_EQ_##SZ(R, Fn, Fm); }while(0)
  67. #define CMP(OP) ({ int r; BOTH_PRmn(OP##_X,r); r; })
  68. static int
  69. fcmp_gt(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  70. {
  71. if (CMP(CMP) > 0)
  72. regs->sr |= 1;
  73. else
  74. regs->sr &= ~1;
  75. return 0;
  76. }
  77. static int
  78. fcmp_eq(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  79. {
  80. if (CMP(CMP /*EQ*/) == 0)
  81. regs->sr |= 1;
  82. else
  83. regs->sr &= ~1;
  84. return 0;
  85. }
  86. #define ARITH_X(SZ,OP,M,N) do{ \
  87. FP_DECL_##SZ(Fm); FP_DECL_##SZ(Fn); FP_DECL_##SZ(Fr); \
  88. UNPACK_##SZ(Fm, M); UNPACK_##SZ(Fn, N); \
  89. FP_##OP##_##SZ(Fr, Fn, Fm); \
  90. PACK_##SZ(N, Fr); }while(0)
  91. static int
  92. fadd(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  93. {
  94. BOTH_PRmn(ARITH_X, ADD);
  95. return 0;
  96. }
  97. static int
  98. fsub(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  99. {
  100. BOTH_PRmn(ARITH_X, SUB);
  101. return 0;
  102. }
  103. static int
  104. fmul(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  105. {
  106. BOTH_PRmn(ARITH_X, MUL);
  107. return 0;
  108. }
  109. static int
  110. fdiv(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  111. {
  112. BOTH_PRmn(ARITH_X, DIV);
  113. return 0;
  114. }
  115. static int
  116. fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  117. {
  118. FP_DECL_EX;
  119. FP_DECL_S(Fr);
  120. FP_DECL_S(Ft);
  121. FP_DECL_S(F0);
  122. FP_DECL_S(Fm);
  123. FP_DECL_S(Fn);
  124. UNPACK_S(F0, FR0);
  125. UNPACK_S(Fm, FRm);
  126. UNPACK_S(Fn, FRn);
  127. FP_MUL_S(Ft, Fm, F0);
  128. FP_ADD_S(Fr, Fn, Ft);
  129. PACK_S(FRn, Fr);
  130. return 0;
  131. }
  132. // to process fmov's extension (odd n for DR access XD).
  133. #define FMOV_EXT(x) if(x&1) x+=16-1
  134. static int
  135. fmov_idx_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  136. int n)
  137. {
  138. if (FPSCR_SZ) {
  139. FMOV_EXT(n);
  140. READ(FRn, Rm + R0 + 4);
  141. n++;
  142. READ(FRn, Rm + R0);
  143. } else {
  144. READ(FRn, Rm + R0);
  145. }
  146. return 0;
  147. }
  148. static int
  149. fmov_mem_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  150. int n)
  151. {
  152. if (FPSCR_SZ) {
  153. FMOV_EXT(n);
  154. READ(FRn, Rm + 4);
  155. n++;
  156. READ(FRn, Rm);
  157. } else {
  158. READ(FRn, Rm);
  159. }
  160. return 0;
  161. }
  162. static int
  163. fmov_inc_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  164. int n)
  165. {
  166. if (FPSCR_SZ) {
  167. FMOV_EXT(n);
  168. READ(FRn, Rm + 4);
  169. n++;
  170. READ(FRn, Rm);
  171. Rm += 8;
  172. } else {
  173. READ(FRn, Rm);
  174. Rm += 4;
  175. }
  176. return 0;
  177. }
  178. static int
  179. fmov_reg_idx(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  180. int n)
  181. {
  182. if (FPSCR_SZ) {
  183. FMOV_EXT(m);
  184. WRITE(FRm, Rn + R0 + 4);
  185. m++;
  186. WRITE(FRm, Rn + R0);
  187. } else {
  188. WRITE(FRm, Rn + R0);
  189. }
  190. return 0;
  191. }
  192. static int
  193. fmov_reg_mem(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  194. int n)
  195. {
  196. if (FPSCR_SZ) {
  197. FMOV_EXT(m);
  198. WRITE(FRm, Rn + 4);
  199. m++;
  200. WRITE(FRm, Rn);
  201. } else {
  202. WRITE(FRm, Rn);
  203. }
  204. return 0;
  205. }
  206. static int
  207. fmov_reg_dec(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  208. int n)
  209. {
  210. if (FPSCR_SZ) {
  211. FMOV_EXT(m);
  212. Rn -= 8;
  213. WRITE(FRm, Rn + 4);
  214. m++;
  215. WRITE(FRm, Rn);
  216. } else {
  217. Rn -= 4;
  218. WRITE(FRm, Rn);
  219. }
  220. return 0;
  221. }
  222. static int
  223. fmov_reg_reg(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m,
  224. int n)
  225. {
  226. if (FPSCR_SZ) {
  227. FMOV_EXT(m);
  228. FMOV_EXT(n);
  229. DRn = DRm;
  230. } else {
  231. FRn = FRm;
  232. }
  233. return 0;
  234. }
  235. static int
  236. fnop_mn(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
  237. {
  238. return -EINVAL;
  239. }
  240. // 1 arg instructions.
  241. #define NOTYETn(i) static int i(struct sh_fpu_soft_struct *fregs, int n) \
  242. { printk( #i " not yet done.\n"); return 0; }
  243. NOTYETn(ftrv)
  244. NOTYETn(fsqrt)
  245. NOTYETn(fipr)
  246. NOTYETn(fsca)
  247. NOTYETn(fsrra)
  248. #define EMU_FLOAT_X(SZ,N) do { \
  249. FP_DECL_##SZ(Fn); \
  250. FP_FROM_INT_##SZ(Fn, FPUL, 32, int); \
  251. PACK_##SZ(N, Fn); }while(0)
  252. static int ffloat(struct sh_fpu_soft_struct *fregs, int n)
  253. {
  254. FP_DECL_EX;
  255. if (FPSCR_PR)
  256. EMU_FLOAT_X(D, DRn);
  257. else
  258. EMU_FLOAT_X(S, FRn);
  259. return 0;
  260. }
  261. #define EMU_FTRC_X(SZ,N) do { \
  262. FP_DECL_##SZ(Fn); \
  263. UNPACK_##SZ(Fn, N); \
  264. FP_TO_INT_##SZ(FPUL, Fn, 32, 1); }while(0)
  265. static int ftrc(struct sh_fpu_soft_struct *fregs, int n)
  266. {
  267. FP_DECL_EX;
  268. if (FPSCR_PR)
  269. EMU_FTRC_X(D, DRn);
  270. else
  271. EMU_FTRC_X(S, FRn);
  272. return 0;
  273. }
  274. static int fcnvsd(struct sh_fpu_soft_struct *fregs, int n)
  275. {
  276. FP_DECL_EX;
  277. FP_DECL_S(Fn);
  278. FP_DECL_D(Fr);
  279. UNPACK_S(Fn, FPUL);
  280. FP_CONV(D, S, 2, 1, Fr, Fn);
  281. PACK_D(DRn, Fr);
  282. return 0;
  283. }
  284. static int fcnvds(struct sh_fpu_soft_struct *fregs, int n)
  285. {
  286. FP_DECL_EX;
  287. FP_DECL_D(Fn);
  288. FP_DECL_S(Fr);
  289. UNPACK_D(Fn, DRn);
  290. FP_CONV(S, D, 1, 2, Fr, Fn);
  291. PACK_S(FPUL, Fr);
  292. return 0;
  293. }
  294. static int fxchg(struct sh_fpu_soft_struct *fregs, int flag)
  295. {
  296. FPSCR ^= flag;
  297. return 0;
  298. }
  299. static int fsts(struct sh_fpu_soft_struct *fregs, int n)
  300. {
  301. FRn = FPUL;
  302. return 0;
  303. }
  304. static int flds(struct sh_fpu_soft_struct *fregs, int n)
  305. {
  306. FPUL = FRn;
  307. return 0;
  308. }
  309. static int fneg(struct sh_fpu_soft_struct *fregs, int n)
  310. {
  311. FRn ^= (1 << (_FP_W_TYPE_SIZE - 1));
  312. return 0;
  313. }
  314. static int fabs(struct sh_fpu_soft_struct *fregs, int n)
  315. {
  316. FRn &= ~(1 << (_FP_W_TYPE_SIZE - 1));
  317. return 0;
  318. }
  319. static int fld0(struct sh_fpu_soft_struct *fregs, int n)
  320. {
  321. FRn = 0;
  322. return 0;
  323. }
  324. static int fld1(struct sh_fpu_soft_struct *fregs, int n)
  325. {
  326. FRn = (_FP_EXPBIAS_S << (_FP_FRACBITS_S - 1));
  327. return 0;
  328. }
  329. static int fnop_n(struct sh_fpu_soft_struct *fregs, int n)
  330. {
  331. return -EINVAL;
  332. }
  333. /// Instruction decoders.
  334. static int id_fxfd(struct sh_fpu_soft_struct *, int);
  335. static int id_fnxd(struct sh_fpu_soft_struct *, struct pt_regs *, int, int);
  336. static int (*fnxd[])(struct sh_fpu_soft_struct *, int) = {
  337. fsts, flds, ffloat, ftrc, fneg, fabs, fsqrt, fsrra,
  338. fld0, fld1, fcnvsd, fcnvds, fnop_n, fnop_n, fipr, id_fxfd
  339. };
  340. static int (*fnmx[])(struct sh_fpu_soft_struct *, struct pt_regs *, int, int) = {
  341. fadd, fsub, fmul, fdiv, fcmp_eq, fcmp_gt, fmov_idx_reg, fmov_reg_idx,
  342. fmov_mem_reg, fmov_inc_reg, fmov_reg_mem, fmov_reg_dec,
  343. fmov_reg_reg, id_fnxd, fmac, fnop_mn};
  344. static int id_fxfd(struct sh_fpu_soft_struct *fregs, int x)
  345. {
  346. const int flag[] = { FPSCR_SZ, FPSCR_PR, FPSCR_FR, 0 };
  347. switch (x & 3) {
  348. case 3:
  349. fxchg(fregs, flag[x >> 2]);
  350. break;
  351. case 1:
  352. ftrv(fregs, x - 1);
  353. break;
  354. default:
  355. fsca(fregs, x);
  356. }
  357. return 0;
  358. }
  359. static int
  360. id_fnxd(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int x, int n)
  361. {
  362. return (fnxd[x])(fregs, n);
  363. }
  364. static int
  365. id_fnmx(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, u16 code)
  366. {
  367. int n = (code >> 8) & 0xf, m = (code >> 4) & 0xf, x = code & 0xf;
  368. return (fnmx[x])(fregs, regs, m, n);
  369. }
  370. static int
  371. id_sys(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, u16 code)
  372. {
  373. int n = ((code >> 8) & 0xf);
  374. unsigned long *reg = (code & 0x0010) ? &FPUL : &FPSCR;
  375. switch (code & 0xf0ff) {
  376. case 0x005a:
  377. case 0x006a:
  378. Rn = *reg;
  379. break;
  380. case 0x405a:
  381. case 0x406a:
  382. *reg = Rn;
  383. break;
  384. case 0x4052:
  385. case 0x4062:
  386. Rn -= 4;
  387. WRITE(*reg, Rn);
  388. break;
  389. case 0x4056:
  390. case 0x4066:
  391. READ(*reg, Rn);
  392. Rn += 4;
  393. break;
  394. default:
  395. return -EINVAL;
  396. }
  397. return 0;
  398. }
  399. static int fpu_emulate(u16 code, struct sh_fpu_soft_struct *fregs, struct pt_regs *regs)
  400. {
  401. if ((code & 0xf000) == 0xf000)
  402. return id_fnmx(fregs, regs, code);
  403. else
  404. return id_sys(fregs, regs, code);
  405. }
  406. /**
  407. * denormal_to_double - Given denormalized float number,
  408. * store double float
  409. *
  410. * @fpu: Pointer to sh_fpu_soft structure
  411. * @n: Index to FP register
  412. */
  413. static void denormal_to_double(struct sh_fpu_soft_struct *fpu, int n)
  414. {
  415. unsigned long du, dl;
  416. unsigned long x = fpu->fpul;
  417. int exp = 1023 - 126;
  418. if (x != 0 && (x & 0x7f800000) == 0) {
  419. du = (x & 0x80000000);
  420. while ((x & 0x00800000) == 0) {
  421. x <<= 1;
  422. exp--;
  423. }
  424. x &= 0x007fffff;
  425. du |= (exp << 20) | (x >> 3);
  426. dl = x << 29;
  427. fpu->fp_regs[n] = du;
  428. fpu->fp_regs[n+1] = dl;
  429. }
  430. }
  431. /**
  432. * ieee_fpe_handler - Handle denormalized number exception
  433. *
  434. * @regs: Pointer to register structure
  435. *
  436. * Returns 1 when it's handled (should not cause exception).
  437. */
  438. static int ieee_fpe_handler(struct pt_regs *regs)
  439. {
  440. unsigned short insn = *(unsigned short *)regs->pc;
  441. unsigned short finsn;
  442. unsigned long nextpc;
  443. siginfo_t info;
  444. int nib[4] = {
  445. (insn >> 12) & 0xf,
  446. (insn >> 8) & 0xf,
  447. (insn >> 4) & 0xf,
  448. insn & 0xf};
  449. if (nib[0] == 0xb ||
  450. (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */
  451. regs->pr = regs->pc + 4;
  452. if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */
  453. nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3);
  454. finsn = *(unsigned short *) (regs->pc + 2);
  455. } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */
  456. if (regs->sr & 1)
  457. nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1);
  458. else
  459. nextpc = regs->pc + 4;
  460. finsn = *(unsigned short *) (regs->pc + 2);
  461. } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */
  462. if (regs->sr & 1)
  463. nextpc = regs->pc + 4;
  464. else
  465. nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1);
  466. finsn = *(unsigned short *) (regs->pc + 2);
  467. } else if (nib[0] == 0x4 && nib[3] == 0xb &&
  468. (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */
  469. nextpc = regs->regs[nib[1]];
  470. finsn = *(unsigned short *) (regs->pc + 2);
  471. } else if (nib[0] == 0x0 && nib[3] == 0x3 &&
  472. (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */
  473. nextpc = regs->pc + 4 + regs->regs[nib[1]];
  474. finsn = *(unsigned short *) (regs->pc + 2);
  475. } else if (insn == 0x000b) { /* rts */
  476. nextpc = regs->pr;
  477. finsn = *(unsigned short *) (regs->pc + 2);
  478. } else {
  479. nextpc = regs->pc + 2;
  480. finsn = insn;
  481. }
  482. if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */
  483. struct task_struct *tsk = current;
  484. if ((tsk->thread.xstate->softfpu.fpscr & (1 << 17))) {
  485. /* FPU error */
  486. denormal_to_double (&tsk->thread.xstate->softfpu,
  487. (finsn >> 8) & 0xf);
  488. tsk->thread.xstate->softfpu.fpscr &=
  489. ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
  490. task_thread_info(tsk)->status |= TS_USEDFPU;
  491. } else {
  492. info.si_signo = SIGFPE;
  493. info.si_errno = 0;
  494. info.si_code = FPE_FLTINV;
  495. info.si_addr = (void __user *)regs->pc;
  496. force_sig_info(SIGFPE, &info, tsk);
  497. }
  498. regs->pc = nextpc;
  499. return 1;
  500. }
  501. return 0;
  502. }
  503. asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5,
  504. unsigned long r6, unsigned long r7,
  505. struct pt_regs regs)
  506. {
  507. struct task_struct *tsk = current;
  508. siginfo_t info;
  509. if (ieee_fpe_handler (&regs))
  510. return;
  511. regs.pc += 2;
  512. info.si_signo = SIGFPE;
  513. info.si_errno = 0;
  514. info.si_code = FPE_FLTINV;
  515. info.si_addr = (void __user *)regs.pc;
  516. force_sig_info(SIGFPE, &info, tsk);
  517. }
  518. /**
  519. * fpu_init - Initialize FPU registers
  520. * @fpu: Pointer to software emulated FPU registers.
  521. */
  522. static void fpu_init(struct sh_fpu_soft_struct *fpu)
  523. {
  524. int i;
  525. fpu->fpscr = FPSCR_INIT;
  526. fpu->fpul = 0;
  527. for (i = 0; i < 16; i++) {
  528. fpu->fp_regs[i] = 0;
  529. fpu->xfp_regs[i]= 0;
  530. }
  531. }
  532. /**
  533. * do_fpu_inst - Handle reserved instructions for FPU emulation
  534. * @inst: instruction code.
  535. * @regs: registers on stack.
  536. */
  537. int do_fpu_inst(unsigned short inst, struct pt_regs *regs)
  538. {
  539. struct task_struct *tsk = current;
  540. struct sh_fpu_soft_struct *fpu = &(tsk->thread.xstate->softfpu);
  541. perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, 0);
  542. if (!(task_thread_info(tsk)->status & TS_USEDFPU)) {
  543. /* initialize once. */
  544. fpu_init(fpu);
  545. task_thread_info(tsk)->status |= TS_USEDFPU;
  546. }
  547. return fpu_emulate(inst, fpu, regs);
  548. }