mescc: Tinycc support: Char and short sign extend.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 18 May 2018 21:58:10 +0000 (23:58 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 18 May 2018 21:58:10 +0000 (23:58 +0200)
commit4faeece057bfb1910b5b1cd0ffe8d36a81f20c8a
treec899cf71b5d9448fd9d5f59f52402521e8d27e7c
parent7f712e4555b5cc9ea8ad4eb2aa970ab52df3cdf7
mescc: Tinycc support: Char and short sign extend.

* module/mes/as-i386.mes (i386:accu*n->local, i386:byte-accu->local+n,
  i386:word-accu->local+n): Remove.
  (i386:byte-accu, i386:signed-byte-accu, i386:word-accu,
  i386:signed-word-accu): New function.
* module/mes/as-i386.scm: Export them.
* module/language/c99/compiler.mes (accu->local+n-text): Simplify.
  (mem->accu, convert-accu): New function.
  (expr->accu): Use them.
* stage0/x86.M1 (mov____%al,0x32(%ebp), mov____%al,0x8(%ebp),
  mov____%ax,0x32(%ebp), mov____%ax,0x8(%ebp), movzbl_0x32(%ebp),%eax,
  movzbl_0x8(%ebp),%eax, movzwl_0x32(%ebp),%eax,
  movzwl_0x8(%ebp),%eax): Deprecate.
* scaffold/tests/7r-sign-extend.c: Test it.
* build-aux/check-mescc.sh (tests): Run it.
build-aux/check-mescc.sh
module/language/c99/compiler.mes
module/language/c99/info.scm
module/mes/as-i386.mes
module/mes/as-i386.scm
scaffold/tests/7r-sign-extend.c [new file with mode: 0644]
stage0/x86.M1