summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authorBen Rudiak-Gould <benrudiak@gmail.com>2013-03-03 18:43:07 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2013-03-03 20:50:46 +0400
commitd1ac29a3cc513642a8d42ddf964b903f5e1508d4 (patch)
tree7c582f2c8fb9f48f13bc74ee96ca4631286f37fb /assemble.c
parent83e6924e1a583d432e9a54c68a59779da5d8ce3d (diff)
downloadnasm-d1ac29a3cc513642a8d42ddf964b903f5e1508d4.tar.gz
nasm-d1ac29a3cc513642a8d42ddf964b903f5e1508d4.tar.bz2
nasm-d1ac29a3cc513642a8d42ddf964b903f5e1508d4.zip
insns: Remove pushseg/popseg internal bytecodes
This patch is getting rid of the following bytecodes 'pushseg','popseg','pushseg2','popseg2' and simplifies overall code. [gorcunov@: a few style fixes] Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/assemble.c b/assemble.c
index a798d17..6e230ea 100644
--- a/assemble.c
+++ b/assemble.c
@@ -124,10 +124,6 @@
* \340 - reserve <operand 0> bytes of uninitialized storage.
* Operand 0 had better be a segmentless constant.
* \341 - this instruction needs a WAIT "prefix"
- * \344,\345 - the PUSH/POP (respectively) codes for CS, DS, ES, SS
- * (POP is never used for CS) depending on operand 0
- * \346,\347 - the second byte of PUSH/POP codes for FS, GS, depending
- * on operand 0
* \360 - no SSE prefix (== \364\331)
* \361 - 66 SSE prefix (== \366\331)
* \362 - F2 SSE prefix (== \364\332)
@@ -1050,10 +1046,6 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits,
ins->prefixes[PPS_WAIT] = P_WAIT;
break;
- case4(0344):
- length++;
- break;
-
case 0360:
break;
@@ -1602,48 +1594,6 @@ static void gencode(int32_t segment, int64_t offset, int bits,
case 0341:
break;
- case 0344:
- case 0345:
- bytes[0] = c & 1;
- switch (ins->oprs[0].basereg) {
- case R_CS:
- bytes[0] += 0x0E;
- break;
- case R_DS:
- bytes[0] += 0x1E;
- break;
- case R_ES:
- bytes[0] += 0x06;
- break;
- case R_SS:
- bytes[0] += 0x16;
- break;
- default:
- errfunc(ERR_PANIC,
- "bizarre 8086 segment register received");
- }
- out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG);
- offset++;
- break;
-
- case 0346:
- case 0347:
- bytes[0] = c & 1;
- switch (ins->oprs[0].basereg) {
- case R_FS:
- bytes[0] += 0xA0;
- break;
- case R_GS:
- bytes[0] += 0xA8;
- break;
- default:
- errfunc(ERR_PANIC,
- "bizarre 386 segment register received");
- }
- out(offset, segment, bytes, OUT_RAWDATA, 1, NO_SEG, NO_SEG);
- offset++;
- break;
-
case 0360:
break;