diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-12-02 02:51:18 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2012-12-03 01:34:19 +0400 |
commit | 0564bd8369783d44bbb4759dd23690eb361988c0 (patch) | |
tree | 2a9f0d6aa890fdb240c9f94579e2dbb21434f013 | |
parent | ea135e8e731253986c3b384699584b96d8c35cc1 (diff) | |
download | nasm-0564bd8369783d44bbb4759dd23690eb361988c0.tar.gz |
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
@@ -867,16 +867,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; @@ -988,9 +983,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; @@ -1111,9 +1104,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; @@ -1126,9 +1117,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: |