0ee8f57dbd62f45d6d0999b59ae162fd4665c15f
[cacao.git] / src / vm / jit / alpha / emit.c
1 /* src/vm/jit/alpha/emit.c - Alpha code emitter functions
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: emit.c 4398 2006-01-31 23:43:08Z twisti $
26
27 */
28
29
30 #include "config.h"
31 #include "vm/types.h"
32
33 #include <assert.h>
34
35 #include "md-abi.h"
36
37 #include "vm/jit/alpha/codegen.h"
38
39 #include "mm/memory.h"
40
41 #if defined(ENABLE_THREADS)
42 # include "threads/native/lock.h"
43 #endif
44
45 #include "vm/builtin.h"
46 #include "vm/exceptions.h"
47
48 #include "vm/jit/abi-asm.h"
49 #include "vm/jit/asmpart.h"
50 #include "vm/jit/dseg.h"
51 #include "vm/jit/emit-common.h"
52 #include "vm/jit/jit.h"
53 #include "vm/jit/replace.h"
54
55 #include "vmcore/options.h"
56
57
58 /* emit_load *******************************************************************
59
60    Emits a possible load of an operand.
61
62 *******************************************************************************/
63
64 s4 emit_load(jitdata *jd, instruction *iptr, varinfo *src, s4 tempreg)
65 {
66         codegendata  *cd;
67         s4            disp;
68         s4            reg;
69
70         /* get required compiler data */
71
72         cd = jd->cd;
73
74         if (IS_INMEMORY(src->flags)) {
75                 COUNT_SPILLS;
76
77                 disp = src->vv.regoff * 8;
78
79                 switch (src->type) {
80                 case TYPE_INT:
81                 case TYPE_LNG:
82                 case TYPE_ADR:
83                         M_LLD(tempreg, REG_SP, disp);
84                         break;
85                 case TYPE_FLT:
86                 case TYPE_DBL:
87                         M_DLD(tempreg, REG_SP, disp);
88                         break;
89                 default:
90                         vm_abort("emit_load: unknown type %d", src->type);
91                 }
92
93                 reg = tempreg;
94         }
95         else
96                 reg = src->vv.regoff;
97
98         return reg;
99 }
100
101
102 /* emit_store ******************************************************************
103
104    Emit a possible store for the given variable.
105
106 *******************************************************************************/
107
108 void emit_store(jitdata *jd, instruction *iptr, varinfo *dst, s4 d)
109 {
110         codegendata  *cd;
111         s4            disp;
112
113         /* get required compiler data */
114
115         cd = jd->cd;
116
117         if (IS_INMEMORY(dst->flags)) {
118                 COUNT_SPILLS;
119
120                 disp = dst->vv.regoff * 8;
121
122                 switch (dst->type) {
123                 case TYPE_INT:
124                 case TYPE_LNG:
125                 case TYPE_ADR:
126                         M_LST(d, REG_SP, disp);
127                         break;
128                 case TYPE_FLT:
129                 case TYPE_DBL:
130                         M_DST(d, REG_SP, disp);
131                         break;
132                 default:
133                         vm_abort("emit_store: unknown type %d", dst->type);
134                 }
135         }
136 }
137
138
139 /* emit_copy *******************************************************************
140
141    Generates a register/memory to register/memory copy.
142
143 *******************************************************************************/
144
145 void emit_copy(jitdata *jd, instruction *iptr, varinfo *src, varinfo *dst)
146 {
147         codegendata  *cd;
148         s4            s1, d;
149
150         /* get required compiler data */
151
152         cd = jd->cd;
153
154         if ((src->vv.regoff != dst->vv.regoff) ||
155                 ((src->flags ^ dst->flags) & INMEMORY)) {
156
157                 /* If one of the variables resides in memory, we can eliminate
158                    the register move from/to the temporary register with the
159                    order of getting the destination register and the load. */
160
161                 if (IS_INMEMORY(src->flags)) {
162                         d = codegen_reg_of_var(iptr->opc, dst, REG_IFTMP);
163                         s1 = emit_load(jd, iptr, src, d);
164                 }
165                 else {
166                         s1 = emit_load(jd, iptr, src, REG_IFTMP);
167                         d = codegen_reg_of_var(iptr->opc, dst, s1);
168                 }
169
170                 if (s1 != d) {
171                         switch (dst->type) {
172                         case TYPE_INT:
173                         case TYPE_LNG:
174                         case TYPE_ADR:
175                                 M_MOV(s1, d);
176                                 break;
177                         case TYPE_FLT:
178                         case TYPE_DBL:
179                                 M_FMOV(s1, d);
180                                 break;
181                         default:
182                                 vm_abort("emit_copy: unknown type %d", dst->type);
183                         }
184                 }
185
186                 emit_store(jd, iptr, dst, d);
187         }
188 }
189
190
191 /* emit_iconst *****************************************************************
192
193    XXX
194
195 *******************************************************************************/
196
197 void emit_iconst(codegendata *cd, s4 d, s4 value)
198 {
199         s4 disp;
200
201         if ((value >= -32768) && (value <= 32767))
202                 M_LDA_INTERN(d, REG_ZERO, value);
203         else {
204                 disp = dseg_add_s4(cd, value);
205                 M_ILD(d, REG_PV, disp);
206         }
207 }
208
209
210 /* emit_lconst *****************************************************************
211
212    XXX
213
214 *******************************************************************************/
215
216 void emit_lconst(codegendata *cd, s4 d, s8 value)
217 {
218         s4 disp;
219
220         if ((value >= -32768) && (value <= 32767))
221                 M_LDA_INTERN(d, REG_ZERO, value);
222         else {
223                 disp = dseg_add_s8(cd, value);
224                 M_LLD(d, REG_PV, disp);
225         }
226 }
227
228
229 /* emit_branch *****************************************************************
230
231    Emits the code for conditional and unconditional branchs.
232
233 *******************************************************************************/
234
235 void emit_branch(codegendata *cd, s4 disp, s4 condition, s4 reg, u4 opt)
236 {
237         s4 checkdisp;
238         s4 branchdisp;
239
240         /* calculate the different displacements */
241
242         checkdisp  = (disp - 4);
243         branchdisp = (disp - 4) >> 2;
244
245         /* check which branch to generate */
246
247         if (condition == BRANCH_UNCONDITIONAL) {
248                 /* check displacement for overflow */
249
250                 if ((checkdisp < (s4) 0xffe00000) || (checkdisp > (s4) 0x001fffff)) {
251                         /* if the long-branches flag isn't set yet, do it */
252
253                         if (!CODEGENDATA_HAS_FLAG_LONGBRANCHES(cd)) {
254                                 log_println("setting error");
255                                 cd->flags |= (CODEGENDATA_FLAG_ERROR |
256                                                           CODEGENDATA_FLAG_LONGBRANCHES);
257                         }
258
259                         vm_abort("emit_branch: emit unconditional long-branch code");
260                 }
261                 else {
262                         M_BR(branchdisp);
263                 }
264         }
265         else {
266                 /* and displacement for overflow */
267
268                 if ((checkdisp < (s4) 0xffe00000) || (checkdisp > (s4) 0x001fffff)) {
269                         /* if the long-branches flag isn't set yet, do it */
270
271                         if (!CODEGENDATA_HAS_FLAG_LONGBRANCHES(cd)) {
272                                 log_println("setting error");
273                                 cd->flags |= (CODEGENDATA_FLAG_ERROR |
274                                                           CODEGENDATA_FLAG_LONGBRANCHES);
275                         }
276
277                         vm_abort("emit_branch: emit conditional long-branch code");
278                 }
279                 else {
280                         switch (condition) {
281                         case BRANCH_EQ:
282                                 M_BEQZ(reg, branchdisp);
283                                 break;
284                         case BRANCH_NE:
285                                 M_BNEZ(reg, branchdisp);
286                                 break;
287                         case BRANCH_LT:
288                                 M_BLTZ(reg, branchdisp);
289                                 break;
290                         case BRANCH_GE:
291                                 M_BGEZ(reg, branchdisp);
292                                 break;
293                         case BRANCH_GT:
294                                 M_BGTZ(reg, branchdisp);
295                                 break;
296                         case BRANCH_LE:
297                                 M_BLEZ(reg, branchdisp);
298                                 break;
299                         default:
300                                 vm_abort("emit_branch: unknown condition %d", condition);
301                         }
302                 }
303         }
304 }
305
306
307 /* emit_arithmetic_check *******************************************************
308
309    Emit an ArithmeticException check.
310
311 *******************************************************************************/
312
313 void emit_arithmetic_check(codegendata *cd, instruction *iptr, s4 reg)
314 {
315         if (INSTRUCTION_MUST_CHECK(iptr)) {
316                 M_BNEZ(reg, 1);
317                 /* Destination register must not be REG_ZERO, because then no
318                    SIGSEGV is thrown. */
319                 M_ALD_INTERN(reg, REG_ZERO, EXCEPTION_HARDWARE_ARITHMETIC);
320         }
321 }
322
323
324 /* emit_arrayindexoutofbounds_check ********************************************
325
326    Emit an ArrayIndexOutOfBoundsException check.
327
328 *******************************************************************************/
329
330 void emit_arrayindexoutofbounds_check(codegendata *cd, instruction *iptr, s4 s1, s4 s2)
331 {
332         if (INSTRUCTION_MUST_CHECK(iptr)) {
333                 M_ILD(REG_ITMP3, s1, OFFSET(java_arrayheader, size));
334                 M_CMPULT(s2, REG_ITMP3, REG_ITMP3);
335                 M_BNEZ(REG_ITMP3, 1);
336                 M_ALD_INTERN(s2, REG_ZERO, EXCEPTION_HARDWARE_ARRAYINDEXOUTOFBOUNDS);
337         }
338 }
339
340
341 /* emit_classcast_check ********************************************************
342
343    Emit a ClassCastException check.
344
345 *******************************************************************************/
346
347 void emit_classcast_check(codegendata *cd, instruction *iptr, s4 condition, s4 reg, s4 s1)
348 {
349         if (INSTRUCTION_MUST_CHECK(iptr)) {
350                 switch (condition) {
351                 case BRANCH_EQ:
352                         M_BNEZ(reg, 1);
353                         break;
354                 case BRANCH_LE:
355                         M_BGTZ(reg, 1);
356                         break;
357                 default:
358                         vm_abort("emit_classcast_check: unknown condition %d", condition);
359                 }
360                 M_ALD_INTERN(s1, REG_ZERO, EXCEPTION_HARDWARE_CLASSCAST);
361         }
362 }
363
364
365 /* emit_nullpointer_check ******************************************************
366
367    Emit a NullPointerException check.
368
369 *******************************************************************************/
370
371 void emit_nullpointer_check(codegendata *cd, instruction *iptr, s4 reg)
372 {
373         if (INSTRUCTION_MUST_CHECK(iptr)) {
374                 M_BNEZ(reg, 1);
375                 /* Destination register must not be REG_ZERO, because then no
376                    SIGSEGV is thrown. */
377                 M_ALD_INTERN(reg, REG_ZERO, EXCEPTION_HARDWARE_NULLPOINTER);
378         }
379 }
380
381
382 /* emit_exception_check ********************************************************
383
384    Emit an Exception check.
385
386 *******************************************************************************/
387
388 void emit_exception_check(codegendata *cd, instruction *iptr)
389 {
390         if (INSTRUCTION_MUST_CHECK(iptr)) {
391                 M_BNEZ(REG_RESULT, 1);
392                 /* Destination register must not be REG_ZERO, because then no
393                    SIGSEGV is thrown. */
394                 M_ALD_INTERN(REG_RESULT, REG_ZERO, EXCEPTION_HARDWARE_EXCEPTION);
395         }
396 }
397
398
399 /* emit_patcher_stubs **********************************************************
400
401    Generates the code for the patcher stubs.
402
403 *******************************************************************************/
404
405 void emit_patcher_stubs(jitdata *jd)
406 {
407         codegendata *cd;
408         patchref    *pref;
409         u4           mcode;
410         u1          *savedmcodeptr;
411         u1          *tmpmcodeptr;
412         s4           targetdisp;
413         s4           disp;
414
415         /* get required compiler data */
416
417         cd = jd->cd;
418
419         /* generate code patching stub call code */
420
421         targetdisp = 0;
422
423         for (pref = cd->patchrefs; pref != NULL; pref = pref->next) {
424                 /* check code segment size */
425
426                 MCODECHECK(100);
427
428                 /* Get machine code which is patched back in later. The
429                    call is 1 instruction word long. */
430
431                 tmpmcodeptr = (u1 *) (cd->mcodebase + pref->branchpos);
432
433                 mcode = *((u4 *) tmpmcodeptr);
434
435                 /* Patch in the call to call the following code (done at
436                    compile time). */
437
438                 savedmcodeptr = cd->mcodeptr;   /* save current mcodeptr              */
439                 cd->mcodeptr  = tmpmcodeptr;    /* set mcodeptr to patch position     */
440
441                 disp = ((u4 *) savedmcodeptr) - (((u4 *) tmpmcodeptr) + 1);
442                 M_BSR(REG_ITMP3, disp);
443
444                 cd->mcodeptr = savedmcodeptr;   /* restore the current mcodeptr       */
445
446                 /* create stack frame */
447
448                 M_LSUB_IMM(REG_SP, 6 * 8, REG_SP);
449
450                 /* move return address onto stack */
451
452                 M_AST(REG_ITMP3, REG_SP, 5 * 8);
453
454                 /* move pointer to java_objectheader onto stack */
455
456 #if defined(ENABLE_THREADS)
457                 /* create a virtual java_objectheader */
458
459                 (void) dseg_add_unique_address(cd, NULL);                  /* flcword */
460                 (void) dseg_add_unique_address(cd, lock_get_initial_lock_word());
461                 disp = dseg_add_unique_address(cd, NULL);                  /* vftbl   */
462
463                 M_LDA(REG_ITMP3, REG_PV, disp);
464                 M_AST(REG_ITMP3, REG_SP, 4 * 8);
465 #else
466                 /* nothing to do */
467 #endif
468
469                 /* move machine code onto stack */
470
471                 disp = dseg_add_s4(cd, mcode);
472                 M_ILD(REG_ITMP3, REG_PV, disp);
473                 M_IST(REG_ITMP3, REG_SP, 3 * 8);
474
475                 /* move class/method/field reference onto stack */
476
477                 disp = dseg_add_address(cd, pref->ref);
478                 M_ALD(REG_ITMP3, REG_PV, disp);
479                 M_AST(REG_ITMP3, REG_SP, 2 * 8);
480
481                 /* move data segment displacement onto stack */
482
483                 disp = dseg_add_s4(cd, pref->disp);
484                 M_ILD(REG_ITMP3, REG_PV, disp);
485                 M_IST(REG_ITMP3, REG_SP, 1 * 8);
486
487                 /* move patcher function pointer onto stack */
488
489                 disp = dseg_add_functionptr(cd, pref->patcher);
490                 M_ALD(REG_ITMP3, REG_PV, disp);
491                 M_AST(REG_ITMP3, REG_SP, 0 * 8);
492
493                 if (targetdisp == 0) {
494                         targetdisp = ((u4 *) cd->mcodeptr) - ((u4 *) cd->mcodebase);
495
496                         disp = dseg_add_functionptr(cd, asm_patcher_wrapper);
497                         M_ALD(REG_ITMP3, REG_PV, disp);
498                         M_JMP(REG_ZERO, REG_ITMP3);
499                 }
500                 else {
501                         disp = (((u4 *) cd->mcodebase) + targetdisp) -
502                                 (((u4 *) cd->mcodeptr) + 1);
503
504                         M_BR(disp);
505                 }
506         }
507 }
508
509
510 /* emit_replacement_stubs ******************************************************
511
512    Generates the code for the replacement stubs.
513
514 *******************************************************************************/
515
516 #if defined(ENABLE_REPLACEMENT)
517 void emit_replacement_stubs(jitdata *jd)
518 {
519         codegendata *cd;
520         codeinfo    *code;
521         rplpoint    *rplp;
522         s4           disp;
523         s4           i;
524 #if !defined(NDEBUG)
525         u1          *savedmcodeptr;
526 #endif
527
528         /* get required compiler data */
529
530         cd   = jd->cd;
531         code = jd->code;
532
533         rplp = code->rplpoints;
534
535         /* store beginning of replacement stubs */
536
537         code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase);
538
539         for (i = 0; i < code->rplpointcount; ++i, ++rplp) {
540                 /* do not generate stubs for non-trappable points */
541
542                 if (rplp->flags & RPLPOINT_FLAG_NOTRAP)
543                         continue;
544
545                 /* check code segment size */
546
547                 MCODECHECK(100);
548
549 #if !defined(NDEBUG)
550                 savedmcodeptr = cd->mcodeptr;
551 #endif
552
553                 /* create stack frame - 16-byte aligned */
554
555                 M_LSUB_IMM(REG_SP, 2 * 8, REG_SP);
556
557                 /* push address of `rplpoint` struct */
558
559                 disp = dseg_add_address(cd, rplp);
560                 M_ALD(REG_ITMP3, REG_PV, disp);
561                 M_AST(REG_ITMP3, REG_SP, 0 * 8);
562
563                 /* jump to replacement function */
564
565                 disp = dseg_add_functionptr(cd, asm_replacement_out);
566                 M_ALD(REG_ITMP3, REG_PV, disp);
567                 M_JMP(REG_ZERO, REG_ITMP3);
568
569                 assert((cd->mcodeptr - savedmcodeptr) == 4*REPLACEMENT_STUB_SIZE);
570         }
571 }
572 #endif /* defined(ENABLE_REPLACEMENT) */
573
574
575 /* emit_verbosecall_enter ******************************************************
576
577    Generates the code for the call trace.
578
579 *******************************************************************************/
580
581 #if !defined(NDEBUG)
582 void emit_verbosecall_enter(jitdata *jd)
583 {
584         methodinfo   *m;
585         codegendata  *cd;
586         registerdata *rd;
587         methoddesc   *md;
588         s4            disp;
589         s4            i, t;
590
591         /* get required compiler data */
592
593         m  = jd->m;
594         cd = jd->cd;
595         rd = jd->rd;
596
597         md = m->parseddesc;
598
599         /* mark trace code */
600
601         M_NOP;
602
603         M_LDA(REG_SP, REG_SP, -((ARG_CNT + TMP_CNT + 2) * 8));
604         M_AST(REG_RA, REG_SP, 1 * 8);
605
606         /* save argument registers */
607
608         for (i = 0; i < INT_ARG_CNT; i++)
609                 M_LST(rd->argintregs[i], REG_SP, (2 + i) * 8);
610
611         for (i = 0; i < FLT_ARG_CNT; i++)
612                 M_DST(rd->argintregs[i], REG_SP, (2 + INT_ARG_CNT + i) * 8);
613
614         /* save temporary registers for leaf methods */
615
616         if (jd->isleafmethod) {
617                 for (i = 0; i < INT_TMP_CNT; i++)
618                         M_LST(rd->tmpintregs[i], REG_SP, (2 + ARG_CNT + i) * 8);
619
620                 for (i = 0; i < FLT_TMP_CNT; i++)
621                         M_DST(rd->tmpfltregs[i], REG_SP, (2 + ARG_CNT + INT_TMP_CNT + i) * 8);
622         }
623
624         /* load float arguments into integer registers */
625
626         for (i = 0; i < md->paramcount && i < INT_ARG_CNT; i++) {
627                 t = md->paramtypes[i].type;
628
629                 if (IS_FLT_DBL_TYPE(t)) {
630                         if (IS_2_WORD_TYPE(t)) {
631                                 M_DST(rd->argfltregs[i], REG_SP, 0 * 8);
632                                 M_LLD(rd->argintregs[i], REG_SP, 0 * 8);
633                         }
634                         else {
635                                 M_FST(rd->argfltregs[i], REG_SP, 0 * 8);
636                                 M_ILD(rd->argintregs[i], REG_SP, 0 * 8);
637                         }
638                 }
639         }
640
641         disp = dseg_add_address(cd, m);
642         M_ALD(REG_ITMP1, REG_PV, disp);
643         M_AST(REG_ITMP1, REG_SP, 0 * 8);
644         disp = dseg_add_functionptr(cd, builtin_verbosecall_enter);
645         M_ALD(REG_PV, REG_PV, disp);
646         M_JSR(REG_RA, REG_PV);
647         disp = (s4) (cd->mcodeptr - cd->mcodebase);
648         M_LDA(REG_PV, REG_RA, -disp);
649         M_ALD(REG_RA, REG_SP, 1 * 8);
650
651         /* restore argument registers */
652
653         for (i = 0; i < INT_ARG_CNT; i++)
654                 M_LLD(rd->argintregs[i], REG_SP, (2 + i) * 8);
655
656         for (i = 0; i < FLT_ARG_CNT; i++)
657                 M_DLD(rd->argintregs[i], REG_SP, (2 + INT_ARG_CNT + i) * 8);
658
659         /* restore temporary registers for leaf methods */
660
661         if (jd->isleafmethod) {
662                 for (i = 0; i < INT_TMP_CNT; i++)
663                         M_LLD(rd->tmpintregs[i], REG_SP, (2 + ARG_CNT + i) * 8);
664
665                 for (i = 0; i < FLT_TMP_CNT; i++)
666                         M_DLD(rd->tmpfltregs[i], REG_SP, (2 + ARG_CNT + INT_TMP_CNT + i) * 8);
667         }
668
669         M_LDA(REG_SP, REG_SP, (ARG_CNT + TMP_CNT + 2) * 8);
670
671         /* mark trace code */
672
673         M_NOP;
674 }
675 #endif /* !defined(NDEBUG) */
676
677
678 /* emit_verbosecall_exit *******************************************************
679
680    Generates the code for the call trace.
681
682    void builtin_verbosecall_exit(s8 l, double d, float f, methodinfo *m);
683
684 *******************************************************************************/
685
686 #if !defined(NDEBUG)
687 void emit_verbosecall_exit(jitdata *jd)
688 {
689         methodinfo   *m;
690         codegendata  *cd;
691         registerdata *rd;
692         s4            disp;
693
694         /* get required compiler data */
695
696         m  = jd->m;
697         cd = jd->cd;
698         rd = jd->rd;
699
700         /* mark trace code */
701
702         M_NOP;
703
704         M_ASUB_IMM(REG_SP, 4 * 8, REG_SP);
705         M_AST(REG_RA, REG_SP, 0 * 8);
706
707         M_LST(REG_RESULT, REG_SP, 1 * 8);
708         M_DST(REG_FRESULT, REG_SP, 2 * 8);
709
710         M_MOV(REG_RESULT, REG_A0);
711         M_FMOV(REG_FRESULT, REG_FA1);
712         M_FMOV(REG_FRESULT, REG_FA2);
713
714         disp = dseg_add_address(cd, m);
715         M_ALD(REG_A3, REG_PV, disp);
716
717         disp = dseg_add_functionptr(cd, builtin_verbosecall_exit);
718         M_ALD(REG_PV, REG_PV, disp);
719         M_JSR(REG_RA, REG_PV);
720         disp = (cd->mcodeptr - cd->mcodebase);
721         M_LDA(REG_PV, REG_RA, -disp);
722
723         M_DLD(REG_FRESULT, REG_SP, 2 * 8);
724         M_LLD(REG_RESULT, REG_SP, 1 * 8);
725
726         M_ALD(REG_RA, REG_SP, 0 * 8);
727         M_AADD_IMM(REG_SP, 4 * 8, REG_SP);
728
729         /* mark trace code */
730
731         M_NOP;
732 }
733 #endif /* !defined(NDEBUG) */
734
735
736 /*
737  * These are local overrides for various environment variables in Emacs.
738  * Please do not remove this and leave it at the end of the file, where
739  * Emacs will automagically detect them.
740  * ---------------------------------------------------------------------
741  * Local variables:
742  * mode: c
743  * indent-tabs-mode: t
744  * c-basic-offset: 4
745  * tab-width: 4
746  * End:
747  * vim:noexpandtab:sw=4:ts=4:
748  */