David Nadlinger
21a05aa971
Merge branch 'default' into 'merge'.
2011-07-29 00:37:30 +02:00
Alexey Prokhin
2220dd0559
'even' opcode on x86_64
2011-07-19 19:20:40 +04:00
Alexey Prokhin
462cdda4ae
Merge dmdfe 2.053beta
2011-07-19 10:14:04 +04:00
Kelly Wilson
5d0f918e9e
Fix cmpxchg16b instruction for asm blocks. Thanks to wolfwood from the Xomb project for this fix.
2011-05-05 20:56:46 -06:00
David Nadlinger
882e81ec1c
Explicitly add %st as second argument to fucomip.
...
It should really be assumed implicitly, but the GNU as shipping with Mac OS X 10.6 (Apple Inc version cctools-800~26, GNU assembler version 1.38) chokes on the instruction otherwise.
2011-05-01 01:16:36 +02:00
Alexey Prokhin
e21fbc26e8
Fix imul and mul asm opcodes on X86_64
2011-02-25 22:29:34 +03:00
Alexey Prokhin
e921998d75
A few fixes for 64bit
2011-02-23 12:49:57 +03:00
Robert Clipsham
3afe5bae25
Added in a missing opcode from the last commit.
2010-12-09 22:31:31 +00:00
Robert Clipsham
496a87e452
Merged Iain Buclaw's AMD 3dNow! asm changes.
2010-12-09 22:27:14 +00:00
Moritz Warning
93f0672450
fixes #415 : 'swapgs' inline asm opcode mistakenly demands 2 arguments; thanks wolfwood
2010-07-31 21:26:05 +02:00
Kelly Wilson
05c466fc4a
Fix typo for iretq
2010-02-25 17:12:54 -07:00
Robert Clipsham
d6a6b7c797
Fixed ticket #365 . Thanks wilkie.
2009-09-19 00:44:35 +01:00
Kelly Wilson
5d0cdd6157
Fixed iretq problem reported by wilkie of the XomB project
2009-08-17 13:42:19 -06:00
Tomas Lindquist Olsen
df82d09206
Fixed bug #349 , now emits error.
2009-08-02 17:56:30 +02:00
Robert Clipsham
02e7bb26fc
Fixed Op_Shift asm instructions on x86-64.
2009-07-19 23:52:07 +01:00
Frits van Bommel
ba72e39d24
Add syscall to the x86-64 asm parser, and both syscall and sysret to the
...
x86 one. Fixes #316 .
2009-06-01 23:42:42 +02:00
Kelly Wilson
16a2512808
remove extra 'test' instructions and fix 'test' properly
2009-05-19 12:28:44 -06:00
Kelly Wilson
8941b6960c
fix missing 'test' mnemonic and add several variations
2009-05-19 11:58:54 -06:00
Christian Kamm
06108db87e
Yet another fdiv/fsub special case.
2009-05-09 20:13:05 +02:00
Christian Kamm
968e1148d8
Restrict second arg of certain floating-point stores to ST. Fix type postfix
...
for the two argument form of fistp and fisttp.
2009-05-09 08:58:41 +02:00
Christian Kamm
37edd5add6
Fix certain cases of floating point instruction mistranslation.
2009-05-07 21:01:44 +02:00
Christian Kamm
108309a579
Ignore short/long prefix of labels instead of ignoring the whole branch
...
instruction!
2009-05-06 19:56:33 +02:00
Christian Kamm
c57f6212a6
Make the no-operand versions of floating point inline asm instructions always
...
pop the floating point stack - like dmd does.
2009-05-06 18:54:20 +02:00
Christian Kamm
8a8818104b
Translate fsub/fdiv correctly. See #256 .
2009-05-06 18:08:44 +02:00
Kelly Wilson
c60ce29bde
fix wrong arg order for fmul/fadd
2009-05-05 11:51:00 -06:00
Kelly Wilson
7a1052a2fc
Some more fixups for mingw -- missing underscores
2009-04-02 17:27:53 -06:00
Frits van Bommel
8b185b8b6a
Fix field access from inline asm. See tests/mini/asm10.d
2009-03-12 23:48:43 +01:00
Frits van Bommel
ed9af11856
Apply r1106 to x86-64 asm too
2009-03-12 23:31:26 +01:00
Frits van Bommel
ff354d59b2
Use stringstream in asm generation instead of OutBuffer.
...
Besides looking better, this should reduce allocations and copying.
2009-03-12 14:08:57 +01:00
Frits van Bommel
c1bd2234a9
Clean up asm code a bit.
...
- Use vector instead of Array, reducing allocations.
- Use vectors instead of deques since we only push_back and index.
- Remove redundant typedefs of iterators.
- Comment out unused variable (used only in commented-out GDC code).
- A few whitespace changes.
2009-03-12 14:08:57 +01:00
Frits van Bommel
723ae9f9d5
Fix an error in the ASM tables introduced by the recent fistp fixes.
...
(There are only 3 fields for operands)
2009-03-12 14:08:57 +01:00
Kelly Wilson
6e44efb9d2
Logic error fix
2009-03-11 13:54:29 -04:00
Kelly Wilson
15a19c738f
Fix FS:4 miswrite due to earlier changes for a constant displacement
2009-03-11 09:16:41 -06:00
Frits van Bommel
8bb206447f
Add missing EBX clobber to CPUID asm instruction.
2009-03-11 14:17:13 +01:00
Kelly Wilson
85090ef9c9
Change x64 asm in Cache.d from a positive offset from after rbp "-20(%rbp)+4" to before
...
"4+-20(%rbp)"
2009-03-10 22:02:11 -06:00
Kelly Wilson
58d34a9660
Fix for fmul/div/add/sub with no operands. Revert explicit ST0 definition since a typo
...
had caused the need for that.
2009-03-10 18:34:19 -06:00
Kelly Wilson
e59c7db637
Properly fix fistp for x64
2009-03-10 11:06:38 -06:00
Kelly Wilson
0d2e665fc4
Fix for dual operand form of fistp, also make reg ST(0) explicit and fix lindquists
...
previous code that allowed dual operand form of fstp but dissallowed the single
operand form accidently
2009-03-10 06:23:26 -06:00
Kelly Wilson
da7fdb94f7
Fix for asm { jle short Lret; }, used by Tango since dmd accepts the 'short'. We just
...
throw the 'short/long' away right now.
2009-03-09 20:11:42 -06:00
Tomas Lindquist Olsen
d8c89ce681
really fixed fstp a, b; on x86-64
2009-03-08 04:23:44 +01:00
Tomas Lindquist Olsen
9a5350afb1
Applied rev two operand form fstp fix to x86-64 asm
2009-03-08 02:46:37 +01:00
Frits van Bommel
2687d58198
Always pass an address expression (not a var expression) to asm operands of
...
type Arg_Memory.
This fixes the following code:
{{{
void f(real x) { asm { fld x[RBP]; } }
void g(int x) { asm { mov EAX, x[RBP]; } }
}}}
2009-03-08 00:57:58 +01:00
Kelly Wilson
093a22d1d2
Just forgot an opcode for x64
2009-02-28 18:17:45 -07:00
Frits van Bommel
e3d6b1c051
Fix some assembler issues:
...
The assembler was miscompiling "add" (specifically, the "add reg/mem, imm"
variations).
The change that caused this seems to have been made because without it, some
"add"s didn't compile at all.
This patch reverts the previous change, and makes sure assembler operands are
remapped correctly even though the input operands auto-generated due to
updating operations aren't explicitly used.
2009-02-18 21:46:14 +01:00
Frits van Bommel
7c7ed26a17
Revert wilsonk's "fix" for the callingconv1.d problem.
2009-02-16 23:56:56 +01:00
Christian Kamm
51385fe325
Reduce size of integer constant make x86-64 asm parsing code compile on x86-32.
2009-02-16 18:27:33 +01:00
Kelly Wilson
b77c44b7dc
Fix for tests/mini/callingconv1.d
2009-02-15 22:56:10 -07:00
Kelly Wilson
7ea5df5a26
Fix 32 bit truncation of 'asm { movq RAX, 0xAA_1234_5678; }'...ie. move constant larger than 32 bits
2009-02-15 16:30:15 -07:00
Kelly Wilson
cc02076479
Fix shl/r bad operand size error
2009-02-15 16:26:12 -07:00
Tomas Lindquist Olsen
3f7c7c5327
Fixed accessing function symbols from inline asm.
...
Ran x86(-64) asm processors through a code formatter.
2009-02-08 05:14:24 +01:00