mescc: Tinycc support: byte and word struct fields.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 6 Aug 2017 10:27:16 +0000 (12:27 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 6 Aug 2017 10:27:16 +0000 (12:27 +0200)
commit12b41e0e8626a47fd21a56ecf591ca731700d8ea
tree849e27b86a05232b5abacbcfefc2f9418bb78541
parent513180eb2cacdeca13b0a8055ea50c4099afc95d
mescc: Tinycc support: byte and word struct fields.

* stage0/x86.M1 (mov____%al,0x8(%edx)):
  (mov____%ax,(%edx)):
  (mov____%ax,0x32(%edx)):
  (mov____%ax,0x8(%edx)):
  (movzbl_0x32(%eax),%eax):
  (movzbl_0x8(%eax),%eax):
  (movzwl_0x32(%eax),%eax):
  (movzwl_0x8(%eax),%eax): New define.
* module/mes/as-i386.mes (i386:word-accu->base-mem):
  (i386:byte-accu->base-mem+n):
  (i386:word-accu->base-mem+n):
  (i386:byte-mem+n->accu):
  (i386:word-mem+n->accu): New function.
* module/mes/as-i386.scm: Export them.
* module/language/c99/compiler.mes (struct-field): Use actual size for
  simple types (WAS: 4).
  (decl->info):
  (expr->accu): Respect byte and word struct field sizes.
* scaffold/tests/7g-struct-byte-word-field.c: Test it.
* make.scm (add-scaffold-test): Build it.
make.scm
module/language/c99/compiler.mes
module/mes/as-i386.mes
module/mes/as-i386.scm
scaffold/tests/7g-struct-byte-word-field.c [new file with mode: 0644]
stage0/x86.M1