diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-12-02 02:51:18 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2013-03-02 02:59:21 +0400 |
commit | 59df421af31c930aa467232e7c0b487c3f5f5621 (patch) | |
tree | a1fa509993ff5bdf2b7abeec8305b9c8c1490ee8 | |
parent | 62576a016d5681032fb66cef727b255e63234ead (diff) | |
download | nasm-59df421af31c930aa467232e7c0b487c3f5f5621.tar.gz nasm-59df421af31c930aa467232e7c0b487c3f5f5621.tar.bz2 nasm-59df421af31c930aa467232e7c0b487c3f5f5621.zip |
assemble: Use case3/4 where appropriate
This allows to shrink code a bit.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r-- | assemble.c | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -840,16 +840,11 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, opex = 0; /* For the next iteration */ switch (c) { - case 01: - case 02: - case 03: - case 04: + case4(01): codes += c, length += c; break; - case 05: - case 06: - case 07: + case3(05): opex = c; break; @@ -938,9 +933,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, ins->vex_wlp = *codes++; break; - case 0271: - case 0272: - case 0273: + case3(0271): hleok = c & 3; break; @@ -1064,9 +1057,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, case 0360: break; - case 0361: - case 0362: - case 0363: + case3(0361): length++; break; @@ -1079,9 +1070,7 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, length++; break; - case 0370: - case 0371: - case 0372: + case3(0370): break; case 0373: |