comparison lwasm/instab.c @ 254:c7a41b4c89b3 2.x

Added struct support to LWASM
author lost
date Sat, 19 Dec 2009 06:38:43 +0000
parents 0986834ec7d3
children e27279180a73
comparison
equal deleted inserted replaced
253:c537a3a723fc 254:c7a41b4c89b3
83 extern OPFUNC(pseudo_ifdef); 83 extern OPFUNC(pseudo_ifdef);
84 extern OPFUNC(pseudo_ifndef); 84 extern OPFUNC(pseudo_ifndef);
85 extern OPFUNC(pseudo_noop); 85 extern OPFUNC(pseudo_noop);
86 extern OPFUNC(pseudo_includebin); 86 extern OPFUNC(pseudo_includebin);
87 extern OPFUNC(pseudo_extdep); 87 extern OPFUNC(pseudo_extdep);
88
89 extern OPFUNC(pseudo_struct);
90 extern OPFUNC(pseudo_endstruct);
88 91
89 extern OPFUNC(pseudo_os9); 92 extern OPFUNC(pseudo_os9);
90 extern OPFUNC(pseudo_mod); 93 extern OPFUNC(pseudo_mod);
91 extern OPFUNC(pseudo_emod); 94 extern OPFUNC(pseudo_emod);
92 95
357 { "import", { -1, -1, -1, -1 }, pseudo_extern, 0, 0, 1 }, 360 { "import", { -1, -1, -1, -1 }, pseudo_extern, 0, 0, 1 },
358 { "export", { -1, -1, -1, -1 }, pseudo_export, 0, 0, 1 }, 361 { "export", { -1, -1, -1, -1 }, pseudo_export, 0, 0, 1 },
359 362
360 { "extdep", { -1, -1, -1, -1 }, pseudo_extdep, 0, 0, 1 }, 363 { "extdep", { -1, -1, -1, -1 }, pseudo_extdep, 0, 0, 1 },
361 364
362 { "rmb", { -1, -1, -1, -1 }, pseudo_rmb }, 365 { "rmb", { -1, -1, -1, -1 }, pseudo_rmb, 0, 0, 0, 0, 1 },
363 { "rmd", { -1, -1, -1, -1 }, pseudo_rmd }, 366 { "rmd", { -1, -1, -1, -1 }, pseudo_rmd, 0, 0, 0, 0, 1 },
364 { "rmq", { -1, -1, -1, -1 }, pseudo_rmq }, 367 { "rmq", { -1, -1, -1, -1 }, pseudo_rmq, 0, 0, 0, 0, 1 },
365 368
366 { "zmb", { -1, -1, -1, -1 }, pseudo_zmb }, 369 { "zmb", { -1, -1, -1, -1 }, pseudo_zmb },
367 { "zmd", { -1, -1, -1, -1 }, pseudo_zmd }, 370 { "zmd", { -1, -1, -1, -1 }, pseudo_zmd },
368 { "zmq", { -1, -1, -1, -1 }, pseudo_zmq }, 371 { "zmq", { -1, -1, -1, -1 }, pseudo_zmq },
369 372
402 { "ifndef", { -1, -1, -1, -1}, pseudo_ifndef, 1}, 405 { "ifndef", { -1, -1, -1, -1}, pseudo_ifndef, 1},
403 406
404 { "macro", { -1, -1, -1, -1}, pseudo_macro, 1, 0, 1 }, 407 { "macro", { -1, -1, -1, -1}, pseudo_macro, 1, 0, 1 },
405 { "endm", { -1, -1, -1, -1}, pseudo_endm, 1, 1, 1 }, 408 { "endm", { -1, -1, -1, -1}, pseudo_endm, 1, 1, 1 },
406 409
410 { "struct", { -1, -1, -1, -1}, pseudo_struct, 0, 0, 0 },
411 { "ends", { -1, -1, -1, -1}, pseudo_endstruct, 0, 0, 0, 0, 1},
412 { "endstruct", { -1, -1, -1, -1}, pseudo_endstruct, 0, 0, 0, 0, 1 },
413
407 { "setdp", { -1, -1, -1, -1}, pseudo_setdp }, 414 { "setdp", { -1, -1, -1, -1}, pseudo_setdp },
408 { "set", { -1, -1, -1, -1}, pseudo_set, 0, 0, 1 }, 415 { "set", { -1, -1, -1, -1}, pseudo_set, 0, 0, 1 },
409 416
410 { "section", { -1, -1, -1, -1}, pseudo_section }, 417 { "section", { -1, -1, -1, -1}, pseudo_section },
411 { "sect", { -1, -1, -1, -1}, pseudo_section }, 418 { "sect", { -1, -1, -1, -1}, pseudo_section },
442 { ".strs", { -1, -1, -1, -1}, pseudo_fcs }, 449 { ".strs", { -1, -1, -1, -1}, pseudo_fcs },
443 450
444 { ".asciz", { -1, -1, -1, -1}, pseudo_fcn }, 451 { ".asciz", { -1, -1, -1, -1}, pseudo_fcn },
445 { ".strz", { -1, -1, -1, -1}, pseudo_fcn }, 452 { ".strz", { -1, -1, -1, -1}, pseudo_fcn },
446 453
447 { ".blkb", { -1, -1, -1, -1}, pseudo_rmb }, 454 { ".blkb", { -1, -1, -1, -1}, pseudo_rmb, 0, 0, 0, 0, 1 },
448 { ".ds", { -1, -1, -1, -1}, pseudo_rmb }, 455 { ".ds", { -1, -1, -1, -1}, pseudo_rmb, 0, 0, 0, 0, 1 },
449 { ".rs", { -1, -1, -1, -1}, pseudo_rmb }, 456 { ".rs", { -1, -1, -1, -1}, pseudo_rmb, 0, 0, 0, 0, 1 },
450 457
451 // needs to handle C escapes maybe? 458 // needs to handle C escapes maybe?
452 // { ".ascii", { -1, -1, -1, -1}, pseudo_ascii }, 459 // { ".ascii", { -1, -1, -1, -1}, pseudo_ascii },
453 460
454 // for compatibility 461 // for compatibility