* src/vm/jit/m68k/emit.c (emit_mov_imm_reg): Fixed.
[cacao.git] / src / vm / jit / m68k / emit.c
1 /* src/vm/jit/m68k/emit.c
2
3    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25    $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
26
27 */
28
29
30 #include "config.h"
31
32 #include <assert.h>
33
34 #include "emit.h"
35 #include "vm/jit/emit-common.h"
36 #include "vm/exceptions.h"
37 #include "vm/jit/asmpart.h"
38 #include "vm/builtin.h"
39
40 #include "mm/memory.h"
41
42 #include "threads/lock-common.h"
43
44 #include "codegen.h"
45 #include "md-os.h"
46
47 /*
48  *      Loads an immededat operand into data register
49  */
50 void emit_mov_imm_reg (codegendata *cd, s4 imm, s4 dreg)
51 {
52         /* FIXME: -1 can be used as byte form 0xff, but this ifs cascade is plain wrong it seems */
53
54         if ( (imm & 0x0000007F) == imm) {
55                 /* use byte form */
56                 *((s2*)cd->mcodeptr) = 0x7000 | (dreg << 9) | imm;      /* MOVEQ.L */
57                 cd->mcodeptr += 2;
58         } else if ((imm  & 0x00007FFF) == imm)  {
59                 /* use word form */
60                 OPWORD( ((3<<6) | (dreg << 3) | 0), 7, 4);
61                 *((s2*)cd->mcodeptr) = (s2)imm;
62                 cd->mcodeptr += 2;
63         } else {
64                 /* use long form */
65                 OPWORD( ((2<<6) | (dreg << 3) | 0), 7, 4);
66                 *((s4*)cd->mcodeptr) = (s4)imm;
67                 cd->mcodeptr += 4;
68
69         }
70 }
71
72
73 /* emit_copy *******************************************************************
74
75    Generates a register/memory to register/memory copy.
76
77 *******************************************************************************/
78
79 void emit_copy(jitdata *jd, instruction *iptr)
80 {
81         codegendata *cd;
82         varinfo     *src;
83         varinfo     *dst;
84         s4           s1, d;
85
86         /* get required compiler data */
87
88         cd = jd->cd;
89
90         /* get source and destination variables */
91
92         src = VAROP(iptr->s1);
93         dst = VAROP(iptr->dst);
94
95         if ((src->vv.regoff != dst->vv.regoff) ||
96                 (IS_INMEMORY(src->flags ^ dst->flags))) {
97
98                 if ((src->type == TYPE_RET) || (dst->type == TYPE_RET)) {
99                         /* emit nothing, as the value won't be used anyway */
100                         return;
101                 }
102
103                 /* If one of the variables resides in memory, we can eliminate
104                    the register move from/to the temporary register with the
105                    order of getting the destination register and the load. */
106
107                 if (IS_INMEMORY(src->flags)) {
108                         if (IS_LNG_TYPE(src->type))
109                                 d = codegen_reg_of_var(iptr->opc, dst, REG_ITMP12_PACKED);
110                         else
111                                 d = codegen_reg_of_var(iptr->opc, dst, REG_IFTMP);
112
113                         s1 = emit_load(jd, iptr, src, d);
114                 }
115                 else {
116                         if (IS_LNG_TYPE(src->type))
117                                 s1 = emit_load(jd, iptr, src, REG_ITMP12_PACKED);
118                         else
119                                 s1 = emit_load(jd, iptr, src, REG_IFTMP);
120
121                         d = codegen_reg_of_var(iptr->opc, dst, s1);
122                 }
123
124                 if (s1 != d) {
125                         switch(src->type)       {
126                         case TYPE_INT: M_INTMOVE(s1, d); break;
127                         case TYPE_ADR: M_ADRMOVE(s1, d); break;
128                         case TYPE_LNG: M_LNGMOVE(s1, d); break;
129 #if !defined(ENABLE_SOFTFLOAT)
130                         case TYPE_FLT: M_FLTMOVE(s1, d); break;
131                         case TYPE_DBL: M_DBLMOVE(s1, d); break;
132 #else
133                         case TYPE_FLT: M_INTMOVE(s1, d); break;
134                         case TYPE_DBL: M_LNGMOVE(s1, d); break;
135 #endif
136                         default:
137                                 vm_abort("emit_copy: unknown type %d", src->type);
138                         }
139                 }
140
141                 emit_store(jd, iptr, dst, d);
142         }
143 }
144
145
146 /* emit_store ******************************************************************
147
148    Emits a possible store of the destination operand.
149
150 *******************************************************************************/
151
152 inline void emit_store(jitdata *jd, instruction *iptr, varinfo *dst, s4 d)
153 {
154         codegendata  *cd;
155
156         /* get required compiler data */
157
158         cd = jd->cd;
159
160         if (IS_INMEMORY(dst->flags)) {
161                 COUNT_SPILLS;
162         
163                 switch(dst->type)       {
164 #if defined(ENABLE_SOFTFLOAT)
165                         case TYPE_DBL:
166 #endif
167                         case TYPE_LNG:
168                                 M_LST(d, REG_SP, dst->vv.regoff * 4);
169                                 break;
170 #if defined(ENABLE_SOFTFLOAT)
171                         case TYPE_FLT:
172 #endif
173                         case TYPE_INT:
174                                 M_IST(d, REG_SP, dst->vv.regoff * 4);
175                                 break;
176                         case TYPE_ADR:
177                                 M_AST(d, REG_SP, dst->vv.regoff * 4);
178                                 break;
179 #if !defined(ENABLE_SOFTFLOAT)
180                         case TYPE_DBL:
181                                 M_DST(d, REG_SP, dst->vv.regoff * 4);
182                                 break;
183                         case TYPE_FLT:
184                                 M_FST(d, REG_SP, dst->vv.regoff * 4);
185                                 break;
186 #endif
187                         default:
188                                 vm_abort("emit_store: unknown type %d", dst->type);
189                 }
190         }
191 }
192
193
194 /* emit_load *******************************************************************
195
196    Emits a possible load of an operand.
197
198 *******************************************************************************/
199
200 s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
201 {
202         codegendata *cd;
203         s4           disp;
204         s4           reg;
205
206         /* get required compiler data */
207
208         cd = jd->cd;
209
210         if (IS_INMEMORY(src->flags)) {
211                 COUNT_SPILLS;
212
213                 disp = src->vv.regoff * 4;
214         
215                 switch (src->type)      {
216 #if defined(ENABLE_SOFTFLOAT)
217                         case TYPE_FLT:
218 #endif
219                         case TYPE_INT: 
220                                 M_ILD(tempreg, REG_SP, disp);
221                                 break;
222 #if defined(ENABLE_SOFTFLOAT)
223                         case TYPE_DBL:
224 #endif
225                         case TYPE_LNG:
226                                 M_LLD(tempreg, REG_SP, disp);
227                                 break;
228                         case TYPE_ADR:
229                                 M_ALD(tempreg, REG_SP, disp);
230                                 break;
231 #if !defined(ENABLE_SOFTFLOAT)
232                         case TYPE_FLT:
233                                 M_FLD(tempreg, REG_SP, disp);
234                                 break;
235                         case TYPE_DBL:
236                                 M_DLD(tempreg, REG_SP, disp);
237                                 break;
238 #endif
239                         default:
240                                 vm_abort("emit_load: unknown type %d", src->type);
241                 }
242                 #if 0
243                 if (IS_FLT_DBL_TYPE(src->type)) {
244                         if (IS_2_WORD_TYPE(src->type)) {
245                                 M_DLD(tempreg, REG_SP, disp);
246                          } else {
247                                 M_FLD(tempreg, REG_SP, disp);
248                         }
249                 } else {
250                         if (IS_2_WORD_TYPE(src->type)) {
251                                 M_LLD(tempreg, REG_SP, disp);
252                         } else {
253                                 M_ILD(tempreg, REG_SP, disp);
254                         }
255                 }
256                 #endif
257
258                 reg = tempreg;
259         }
260         else
261                 reg = src->vv.regoff;
262
263         return reg;
264 }
265
266
267 /* emit_patcher_stubs **********************************************************
268
269    Generates the code for the patcher stubs.
270
271 *******************************************************************************/
272 void emit_patcher_stubs(jitdata *jd)
273 {
274         codegendata *cd;
275         patchref    *pref;
276         u8           mcode;
277         u1          *savedmcodeptr;
278         u1          *tmpmcodeptr;
279         s4           targetdisp;
280         s4           disp;
281
282         /* get required compiler data */
283
284         cd = jd->cd;
285
286         /* generate code patching stub call code */
287
288         targetdisp = 0;
289
290         for (pref = cd->patchrefs; pref != NULL; pref = pref->next) {
291                 /* check code segment size */
292
293                 MCODECHECK(512);
294
295                 /* Get machine code which is patched back in later. A
296                    `bsr.l' is 6 bytes long. */
297
298                 savedmcodeptr = cd->mcodebase + pref->branchpos;
299                 mcode = *((u8 *) savedmcodeptr);
300
301                 /* patch in `bsr.l' to call the following code */
302
303                 tmpmcodeptr  = cd->mcodeptr;    /* save current mcodeptr              */
304                 cd->mcodeptr = savedmcodeptr;   /* set mcodeptr to patch position     */
305
306                 M_BSR_IMM(tmpmcodeptr - (savedmcodeptr + PATCHER_CALL_SIZE) + 4);
307
308                 cd->mcodeptr = tmpmcodeptr;     /* restore the current mcodeptr       */
309
310                 /* save REG_ITMP3 */
311                 M_IPUSH(REG_ITMP3);             /* FIXME why, and restore where ? */
312
313                 /* move pointer to java_objectheader onto stack */
314
315 #if defined(ENABLE_THREADS)
316                 (void) dseg_add_unique_address(cd, NULL);                  /* flcword */
317                 (void) dseg_add_unique_address(cd, lock_get_initial_lock_word());
318                 disp = dseg_add_unique_address(cd, NULL);                  /* vftbl   */
319
320                 assert(0); /* The next lines are wrong */
321                 M_MOV_IMM(0, REG_ITMP3);
322                 dseg_adddata(cd);
323                 M_AADD_IMM(REG_ITMP3, disp);
324                 M_IPUSH(REG_ITMP3);
325 #else
326                 M_IPUSH_IMM(0);
327 #endif
328
329                 /* push move machine code bytes and classinfo pointer */
330
331                 M_IPUSH_IMM(mcode >> 32);
332                 M_IPUSH_IMM(mcode);
333                 M_IPUSH_IMM(pref->ref);
334                 M_IPUSH_IMM(pref->patcher);
335
336                 M_JMP_IMM(asm_patcher_wrapper);
337         }
338 }
339 s4 emit_load_low(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg) 
340 {
341         codegendata  *cd;
342         s4            disp;
343         s4            reg;
344
345 #if !defined(ENABLE_SOFTFLOAT)
346         assert(src->type == TYPE_LNG);
347 #else
348         assert(src->type == TYPE_LNG || src->type == TYPE_DBL);
349 #endif
350
351         /* get required compiler data */
352         cd = jd->cd;
353
354         if (IS_INMEMORY(src->flags)) {
355                 COUNT_SPILLS;
356
357                 disp = src->vv.regoff * 4;
358                 M_ILD(tempreg, REG_SP, disp + 4);
359                 reg = tempreg;
360         } else {
361                 reg = GET_LOW_REG(src->vv.regoff);
362         }
363         return reg;
364 }
365 s4 emit_load_high(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
366 {
367         codegendata  *cd;
368         s4            disp;
369         s4            reg;
370
371 #if !defined(ENABLE_SOFTFLOAT)
372         assert(src->type == TYPE_LNG);
373 #else
374         assert(src->type == TYPE_LNG || src->type == TYPE_DBL);
375 #endif
376         /* get required compiler data */
377         cd = jd->cd;
378
379         if (IS_INMEMORY(src->flags)) {
380                 COUNT_SPILLS;
381                 disp = src->vv.regoff * 4;
382                 M_ILD(tempreg, REG_SP, disp);
383                 reg = tempreg;
384         } else {
385                 reg = GET_HIGH_REG(src->vv.regoff);
386         }
387         return reg;
388 }
389 /* emit_branch *****************************************************************
390
391    Emits the code for conditional and unconditional branchs.
392
393 *******************************************************************************/
394 void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 opt) 
395
396         /* calculate the different displacements */
397         /* PC is a at branch instruction + 2 */
398         /* coditional and uncondition branching work the same way */
399         /* short branches have signed 16 bit offset */
400         /* long branches are signed 32 bit */
401         /* the 8 bit offset branching instructions are not used */
402
403         disp  =  disp - 2;
404
405         /* check displacement for overflow */
406         if ((disp & 0x0000FFFF) != disp)        {
407                 if (!CODEGENDATA_HAS_FLAG_LONGBRANCHES(cd)) {
408                         cd->flags |= (CODEGENDATA_FLAG_ERROR | CODEGENDATA_FLAG_LONGBRANCHES);
409                 }
410         }
411
412         /* check which branch to generate */
413
414         if (condition == BRANCH_UNCONDITIONAL) {
415                 if (CODEGENDATA_HAS_FLAG_LONGBRANCHES(cd))      {
416                         M_BR_32(disp);
417                 } else  {
418                         M_BR_16(disp);
419                 }
420         } else {
421                 if (CODEGENDATA_HAS_FLAG_LONGBRANCHES(cd)) {
422                         switch (condition) {
423                         case BRANCH_EQ:
424                                 M_BEQ_32(disp);
425                                 break;
426                         case BRANCH_NE:
427                                 M_BNE_32(disp);
428                                 break;
429                         case BRANCH_LT:
430                                 M_BLT_32(disp);
431                                 break;
432                         case BRANCH_GE:
433                                 M_BGE_32(disp);
434                                 break;
435                         case BRANCH_GT:
436                                 M_BGT_32(disp);
437                                 break;
438                         case BRANCH_LE:
439                                 M_BLE_32(disp);
440                                 break;
441                         case BRANCH_NAN:
442                                 M_BNAN_32(disp);
443                                 break;
444                         case BRANCH_UGT:
445                                 M_BHI_32(disp);
446                                 break;
447
448                         default:
449                                 vm_abort("emit_branch: unknown condition %d", condition);
450                         }
451                 } else {
452                         switch (condition) {
453                         case BRANCH_EQ:
454                                 M_BEQ_16(disp);
455                                 break;
456                         case BRANCH_NE:
457                                 M_BNE_16(disp);
458                                 break;
459                         case BRANCH_LT:
460                                 M_BLT_16(disp);
461                                 break;
462                         case BRANCH_GE:
463                                 M_BGE_16(disp);
464                                 break;
465                         case BRANCH_GT:
466                                 M_BGT_16(disp);
467                                 break;
468                         case BRANCH_LE:
469                                 M_BLE_16(disp);
470                                 break;
471                         case BRANCH_NAN:
472                                 M_BNAN_16(disp);
473                                 break;
474                         case BRANCH_UGT:
475                                 M_BHI_16(disp);
476                                 break;
477                         default:
478                                 vm_abort("emit_branch: unknown condition %d", condition);
479                         }
480                 }
481         }
482 }
483
484
485 #if !defined(NDEBUG)
486 /*
487  *      Trace functions. Implement -verbose:call flag
488  *      code marked by real NOP, but performance is no matter when using -verbose:call :)
489  */
490 void emit_verbosecall_enter(jitdata* jd) 
491
492         methodinfo   *m;
493         codegendata  *cd;
494         registerdata *rd;
495         methoddesc   *md;
496         s4      disp,i,t;
497
498
499         if (!JITDATA_HAS_FLAG_VERBOSECALL(jd))
500                 return;
501         
502         /* get required compiler data */
503         m  = jd->m;
504         cd = jd->cd;
505         rd = jd->rd;
506         md = m->parseddesc;
507
508         /* mark trace code */
509         M_NOP;
510
511         M_LINK(REG_FP, -16*4);  
512         M_PUSHALL;
513
514         /* builtin_verbosecall_enter takes all args as s8 type */
515         /* TRACE_ARGS_NUM is the number of args the builtin_verbosecall_enter expects */
516         M_IPUSH_IMM(m);
517         
518         disp = 16*4 + 4 + 4;    /* points to old argument stack initially */
519
520         /* travel up stack to the first argument of the function which needs to be copied */
521         for (i=0; (i < md->paramcount) && (i < TRACE_ARGS_NUM); i++)    {
522                 disp += 4;
523                 if (IS_2_WORD_TYPE(md->paramtypes[i].type)) {   
524                         disp += 4;
525                 }
526         }
527
528         /* disp now points to the first arg which gets copied to the trace stack, relative to REG_SP! */
529         for (i=TRACE_ARGS_NUM-1; i>=0; --i) {
530                 if (i < md->paramcount) {
531                         /* traced function has such an argument */
532                         t = md->paramtypes[i].type;
533                         
534                         if (IS_2_WORD_TYPE(t))  {
535                                 /* copy from original argument stack */
536                                 M_ILD(REG_ITMP1, REG_SP, disp);
537                                 M_IPUSH(REG_ITMP1);
538                                 M_ILD(REG_ITMP1, REG_SP, disp);
539                                 M_IPUSH(REG_ITMP1);
540                         } else  {
541                                 /* displacment is increased as 4 byte on original stack but 8 byte on trace stack */
542                                 M_ILD(REG_ITMP1, REG_SP, disp);
543                                 M_IPUSH(REG_ITMP1);
544                                 M_IPUSH_IMM(0);
545                                 disp += 4;
546                         }
547                 } else  {
548                         /* function has no arg here, push nothing and adapt displacement */
549                         M_IPUSH_IMM(0);
550                         M_IPUSH_IMM(0);
551                         disp += 8;
552                 }
553         }
554         M_JSR_IMM(builtin_verbosecall_enter);
555         /* pop arguments off stack */
556         M_AADD_IMM(TRACE_ARGS_NUM*8+4, REG_SP);
557
558         M_POPALL;
559         M_UNLK(REG_FP);
560         M_NOP;
561 }
562 void emit_verbosecall_exit(jitdata* jd) 
563
564         methodinfo   *m;
565         codegendata  *cd;
566         registerdata *rd;
567         methoddesc   *md;
568
569         if (!JITDATA_HAS_FLAG_VERBOSECALL(jd))
570                 return;
571
572         /* get required compiler data */
573         m  = jd->m;
574         cd = jd->cd;
575         rd = jd->rd;
576         md = m->parseddesc;
577
578         /* void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m); */
579
580
581         /* mark trace code */
582         M_NOP;
583         M_LINK(REG_FP, 0);
584
585         M_IPUSH_IMM(m);                                 /* push methodinfo */
586
587         M_IPUSH_IMM(0);                                 /* TODO push float result */
588
589         M_IPUSH_IMM(0);                                 /* TODO push double result */
590         M_IPUSH_IMM(0);                                 /* TODO push double result */
591
592         M_IPUSH(GET_HIGH_REG(REG_RESULT_PACKED))
593         M_IPUSH(GET_LOW_REG(REG_RESULT_PACKED))         /* push long result */
594
595
596         M_JSR_IMM(builtin_verbosecall_exit);
597
598         /* poping result registers from stack */
599         M_IPOP(GET_LOW_REG(REG_RESULT_PACKED))
600         M_IPOP(GET_HIGH_REG(REG_RESULT_PACKED))
601
602 #if 0
603         /* that is wrong of course, overwrites registers and stuff */
604         M_IPOP(0);      /* TODO: pop double result */
605         M_IPOP(0);      /* TODO: pop double result */
606
607         M_IPOP(0);      /* TODO: pop float result */
608 #else
609         M_AADD_IMM(3*4, REG_SP);
610 #endif
611         M_AADD_IMM(4, REG_SP);                          /* remove rest of stack */
612         M_UNLK(REG_FP);
613         M_NOP;
614 }
615 #endif
616
617 /* emit_classcast_check ********************************************************
618
619    Emit a ClassCastException check.
620
621 *******************************************************************************/
622
623 void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1)
624 {
625         if (INSTRUCTION_MUST_CHECK(iptr)) {
626                 switch (condition) {
627                 case BRANCH_LE:
628                         M_BGT(4);
629                         break;
630                 case BRANCH_EQ:
631                         M_BNE(4);
632                         break;
633                 case BRANCH_GT:
634                         M_BLE(4);
635                         break;
636                 case BRANCH_UGT:
637                         M_BLS(4);
638                         break;
639                 default:
640                         vm_abort("emit_classcast_check: unknown condition %d", condition);
641                 }
642                 M_TRAP_SETREGISTER(s1);
643                 M_TRAP(EXCEPTION_HARDWARE_CLASSCAST);
644         }
645 }
646
647 /* emit_arrayindexoutofbounds_check ********************************************
648
649    Emit a ArrayIndexOutOfBoundsException check.
650
651 *******************************************************************************/
652 void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2)
653 {
654         if (INSTRUCTION_MUST_CHECK(iptr)) {
655                 M_ILD(REG_ITMP3, s1, OFFSET(java_arrayheader, size));
656                 M_ICMP(s2, REG_ITMP3);
657                 M_BHI(4);
658                 M_TRAP_SETREGISTER(s2);
659                 M_TRAP(EXCEPTION_HARDWARE_ARRAYINDEXOUTOFBOUNDS);
660         }
661 }
662
663 /* emit_nullpointer_check ******************************************************
664
665    Emit a NullPointerException check.
666
667 *******************************************************************************/
668 void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)
669 {
670         if (INSTRUCTION_MUST_CHECK(iptr)) {
671                 /* did like to assert on TYPE_ADR, but not possible in here */
672                 M_ATST(reg);
673                 M_BNE(2);
674                 M_TRAP(M68K_EXCEPTION_HARDWARE_NULLPOINTER);
675         }
676 }
677
678 /* emit_arithmetic_check *******************************************************
679
680    Emit an ArithmeticException check.
681
682 *******************************************************************************/
683
684 void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
685 {
686         if (INSTRUCTION_MUST_CHECK(iptr)) {
687                 M_ITST(reg);
688                 M_BNE(2);
689                 M_TRAP(EXCEPTION_HARDWARE_ARITHMETIC);
690         }
691 }
692
693 #if 0
694 /* emit_exception_check_areg **************************************************
695  *
696    Emit an Exception check, tested register is address REG_RESULT
697
698 *******************************************************************************/
699 void emit_exception_check_areg(codegendata *cd, instruction *iptr)
700 {
701         if (INSTRUCTION_MUST_CHECK(iptr)) {
702                 M_ATST(REG_RESULT);
703                 M_BNE(2);
704                 /*M_ALD_INTERN(REG_ZERO, REG_ZERO, EXCEPTION_HARDWARE_EXCEPTION);*/
705                 M_ILLEGAL; /*FIXME*/
706         }
707 }
708 #endif
709
710 /* emit_exception_check_ireg **************************************************
711
712    Emit an Exception check. Teste register is integer REG_RESULT
713
714 *******************************************************************************/
715 void emit_exception_check(codegendata *cd, instruction *iptr)
716 {
717         if (INSTRUCTION_MUST_CHECK(iptr)) {
718                 M_ITST(REG_RESULT);
719                 M_BNE(2);
720                 /*M_ALD_INTERN(REG_ZERO, REG_ZERO, EXCEPTION_HARDWARE_EXCEPTION);*/
721                 M_TRAP(EXCEPTION_HARDWARE_EXCEPTION);
722         }
723 }
724
725
726 /*
727  * These are local overrides for various environment variables in Emacs.
728  * Please do not remove this and leave it at the end of the file, where
729  * Emacs will automagically detect them.
730  * ---------------------------------------------------------------------
731  * Local variables:
732  * mode: c
733  * indent-tabs-mode: t
734  * c-basic-offset: 4
735  * tab-width: 4
736  * End:
737  * vim:noexpandtab:sw=4:ts=4:
738  */