Mercurial > projects > ddmd
comparison dmd/backend/iasm.d @ 175:94b6033c07f3
get rid of globals
malloc -> GC.malloc
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:48:06 +0400 |
parents | af724d3510d7 |
children | fa9a71a9f5a8 |
comparison
equal
deleted
inserted
replaced
174:af724d3510d7 | 175:94b6033c07f3 |
---|---|
64 code *code_calloc(); | 64 code *code_calloc(); |
65 | 65 |
66 __gshared int BPRM; | 66 __gshared int BPRM; |
67 } | 67 } |
68 | 68 |
69 const(char)*[ASMTK.ASMTKmax] apszAsmtk = [ | 69 enum const(char)*[ASMTK.ASMTKmax] apszAsmtk = [ |
70 "__LOCAL_SIZE", | 70 "__LOCAL_SIZE".ptr, |
71 "dword".ptr, | 71 "dword".ptr, |
72 "even".ptr, | 72 "even".ptr, |
73 "far".ptr, | 73 "far".ptr, |
74 "naked".ptr, | 74 "naked".ptr, |
75 "near".ptr, | 75 "near".ptr, |
290 enum _m112 = CONSTRUCT_FLAGS( 0, _m, 0, _112 ); | 290 enum _m112 = CONSTRUCT_FLAGS( 0, _m, 0, _112 ); |
291 enum _m224 = CONSTRUCT_FLAGS( 0, _m, 0, _224 ); | 291 enum _m224 = CONSTRUCT_FLAGS( 0, _m, 0, _224 ); |
292 enum _m512 = _m224; | 292 enum _m512 = _m224; |
293 enum _sti = CONSTRUCT_FLAGS( 0, _float, 0, _rsti ); | 293 enum _sti = CONSTRUCT_FLAGS( 0, _float, 0, _rsti ); |
294 | 294 |
295 REG regFp = { "ST", 0, _st }; | 295 __gshared REG regFp = { "ST", 0, _st }; |
296 | 296 |
297 REG[8] aregFp = [ | 297 enum REG[8] aregFp = [ |
298 { "ST(0)", 0, _sti }, | 298 { "ST(0)", 0, _sti }, |
299 { "ST(1)", 1, _sti }, | 299 { "ST(1)", 1, _sti }, |
300 { "ST(2)", 2, _sti }, | 300 { "ST(2)", 2, _sti }, |
301 { "ST(3)", 3, _sti }, | 301 { "ST(3)", 3, _sti }, |
302 { "ST(4)", 4, _sti }, | 302 { "ST(4)", 4, _sti }, |
1421 EM_type_as_operand, | 1421 EM_type_as_operand, |
1422 } | 1422 } |
1423 | 1423 |
1424 mixin(BringToCurrentScope!(ASMERRMSGS)); | 1424 mixin(BringToCurrentScope!(ASMERRMSGS)); |
1425 | 1425 |
1426 string[] asmerrmsgs = | 1426 enum string[] asmerrmsgs = |
1427 [ | 1427 [ |
1428 "unknown operand for floating point instruction", | 1428 "unknown operand for floating point instruction", |
1429 "bad addr mode", | 1429 "bad addr mode", |
1430 "align %d must be a power of 2", | 1430 "align %d must be a power of 2", |
1431 "opcode expected, not %s", | 1431 "opcode expected, not %s", |
4373 ; | 4373 ; |
4374 } else | 4374 } else |
4375 o1.ptype = d.type.toBasetype(); | 4375 o1.ptype = d.type.toBasetype(); |
4376 } | 4376 } |
4377 | 4377 |
4378 REG[63] regtab = | 4378 enum REG[63] regtab = |
4379 [ | 4379 [ |
4380 {"AL", _AL, _r8 | _al,}, | 4380 {"AL", _AL, _r8 | _al,}, |
4381 {"AH", _AH, _r8,}, | 4381 {"AH", _AH, _r8,}, |
4382 {"AX", _AX, _r16 | _ax,}, | 4382 {"AX", _AX, _r16 | _ax,}, |
4383 {"EAX", _EAX, _r32 | _eax,}, | 4383 {"EAX", _EAX, _r32 | _eax,}, |