diff options
Diffstat (limited to '')
-rw-r--r-- | src/buildvm_x86.dasc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index bc128457..d7c36d90 100644 --- a/src/buildvm_x86.dasc +++ b/src/buildvm_x86.dasc | |||
@@ -4288,15 +4288,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
4288 | case BC_TSETM: | 4288 | case BC_TSETM: |
4289 | | ins_AD // RA = base (table at base-1), RD = num const (start index) | 4289 | | ins_AD // RA = base (table at base-1), RD = num const (start index) |
4290 | | mov TMP1, KBASE // Need one more free register. | 4290 | | mov TMP1, KBASE // Need one more free register. |
4291 | if (sse) { | 4291 | | mov KBASE, dword [KBASE+RD*8] // Integer constant is in lo-word. |
4292 | | cvtsd2si KBASE, qword [KBASE+RD*8] | ||
4293 | } else { | ||
4294 | |.if not X64 | ||
4295 | | fld qword [KBASE+RD*8] | ||
4296 | | fistp ARG4 // Const is guaranteed to be an int. | ||
4297 | | mov KBASE, ARG4 | ||
4298 | |.endif | ||
4299 | } | ||
4300 | |1: | 4292 | |1: |
4301 | | lea RA, [BASE+RA*8] | 4293 | | lea RA, [BASE+RA*8] |
4302 | | mov TAB:RB, [RA-8] // Guaranteed to be a table. | 4294 | | mov TAB:RB, [RA-8] // Guaranteed to be a table. |
@@ -4308,7 +4300,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop, int cmov, int sse) | |||
4308 | | jz >4 // Nothing to copy? | 4300 | | jz >4 // Nothing to copy? |
4309 | | add RD, KBASE // Compute needed size. | 4301 | | add RD, KBASE // Compute needed size. |
4310 | | cmp RD, TAB:RB->asize | 4302 | | cmp RD, TAB:RB->asize |
4311 | | jae >5 // Does not fit into array part? | 4303 | | jae >5 // Doesn't fit into array part? |
4312 | | sub RD, KBASE | 4304 | | sub RD, KBASE |
4313 | | shl KBASE, 3 | 4305 | | shl KBASE, 3 |
4314 | | add KBASE, TAB:RB->array | 4306 | | add KBASE, TAB:RB->array |