David Nadlinger
0be65aa49b
Add back line accidentally removed in 289bb57a.
2012-12-20 02:07:11 +01:00
David Nadlinger
4118cddd1f
Cleanup: GCC warning fixes.
2012-12-20 01:21:10 +01:00
David Nadlinger
0cd78dd579
Cleanup: Clang warning fixes.
...
No warnings left on a '-Wall' build except for a single tautological
compare in gen/asm-x86-32.h, which indeed seems like a bug.
2012-12-20 01:00:55 +01:00
David Nadlinger
289bb57adf
Cleanup: Fix "braces around initializaion of subobject" warnings.
...
The two ASM implementations should really be merged, as they
are very similar except for the added registers/instructions.
2012-12-20 01:00:51 +01:00
David Nadlinger
9458911839
Added LLVM-style license headers to all our files.
2012-12-16 17:19:14 +01:00
kai
7d1ec52c68
Implement the xgetbv opcode.
...
This solves a FIXME in core.cpuid.
2012-09-14 21:10:39 +02:00
David Nadlinger
6fea7358dc
Fixed several asm-related error message formats.
2012-09-07 03:51:32 +02:00
kai
6e427fe818
Prefer C++-style casts.
...
This is based on Item 2 of "More Effective C++". In general, the C++ cast operators are more expressive and easy to find,
e.g. by grep. Using const_cast also shuts up some compiler warnings.
2012-08-03 06:36:35 +02:00
David Nadlinger
72d510cb5e
Emit floating-point integer quad word instructions with ll suffix.
...
The LLVM MC backend doesn't recognize the q suffix, which was previously used.
See llvm.org/bugs/show_bug.cgi?id=11935.
If this turns out to be a speed problem, it could be done using char[3].
2012-02-09 00:53:28 +01:00
kai
6726b5da13
Compile LDC2 with VS2010 64bit (LDC changes only).
...
Contains all changes necessary to LDC specific source to compile LDC2 with VS2010. See https://github.com/D-Programming-Language/dmd/pull/516 for necessary changes to DMDFE.
2012-01-11 07:49:21 +01:00
David Nadlinger
fe19ee84f5
Merge branch 'llvm3.0' into merge-3.0
...
Conflicts:
gen/configfile.cpp
2011-12-04 18:16:36 +01:00
David Nadlinger
16cdb0c252
Whitespace cleanup.
2011-12-04 18:13:42 +01:00
David Nadlinger
d0ea856024
Emit all D inline asm labels as local labels.
...
On OS X, there is an actual significance to the distinction, which before lead e.g. to exception throwing in the below example being broken:
---
import core.exception;
void main() {
asm {
jmp Lfoo;
Lfoo:
;
}
throw cast(OutOfMemoryError)cast(void*)OutOfMemoryError.classinfo.init;
assert(0);
}
---
2011-12-04 18:13:33 +01:00
kai
a5b3dd29b5
Fixes 2 kinds of warnings.
...
1) The last parameter of getGetElementPtr() has type bool. In some instances, a 2 is used as parameter. This is converted to true.
2) Several loops use int instead of unsigned. This causes warning about signed/unsigned mismatch.
Curiously, only Visual C++ complains about this. Nevertheless I think that the warnings should be fixed.
2011-11-23 19:01:04 +01:00
Alexey Prokhin
462cdda4ae
Merge dmdfe 2.053beta
2011-07-19 10:14:04 +04: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
Tomas Lindquist Olsen
df82d09206
Fixed bug #349 , now emits error.
2009-08-02 17:56:30 +02: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
71477fcb8c
Forgot one windows underscore for asm output
2009-05-30 14:35:03 -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
cde738111c
Fix type postfix for fistp/fisttp. Two operand form still broken (is it even legal?).
2009-05-07 21:49:58 +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
Tomas Lindquist Olsen
4399ff3700
Corrected bad asm match for fstp on x86-32
2009-03-12 23:12:36 +01:00
Tomas Lindquist Olsen
269e37dc88
- Fixed building tango-user-ldc on x86-32.
...
- Added CMake option for extra LLVM components to be linked in.
2009-03-12 22:30:30 +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
e5a4e4cb41
Fix FS:4 problem for x32
2009-03-11 12:13:41 -04:00
Frits van Bommel
8bb206447f
Add missing EBX clobber to CPUID asm instruction.
2009-03-11 14:17:13 +01:00
Kelly Wilson
cff2c92fd3
Change faulty offset for asm in Cache.d (ie. change "-20(%rbp)+4)" to
...
"4+-20(%rbp)")
2009-03-11 00:08:45 -04:00
Kelly Wilson
40887efe59
Fix for x32 fmul/div/add/sub with no operands.
2009-03-10 20:40:22 -04:00
Kelly Wilson
2d11484649
fix fistp properly for x32
2009-03-10 13:59:50 -04:00
Unknown
5bb81ac3d2
Fix 32bit version of "jle short Label;" for 'short' or 'long'.
2009-03-10 09:13:13 -04:00
Tomas Lindquist Olsen
341dfe7a9f
Merge
2009-03-08 02:36:45 +01:00
Tomas Lindquist Olsen
16668d1508
Fixed two operand form of X86 fstp instruction. (throw away second operand!)
2009-03-08 02:36:09 +01:00
Frits van Bommel
59f677c7ae
Apply [1053] to x86-32 asm as well.
2009-03-08 02:07:53 +01: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
Tomas Lindquist Olsen
9705b7e017
Fixed problem accessing global variables from naked asm on osx.
2009-02-03 18:42:25 +01:00
Tomas Lindquist Olsen
dc5944df99
Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
...
Fixed align N; in asm blocks.
Fixed inreg parameter passing on x86 for ref/out params.
Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P
Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
2009-02-03 08:54:57 +01:00
Christian Kamm
955df981f8
Apply duane's patch for align power-of-two checking in inline asm. Fixes #159
2009-01-04 15:39:34 +01:00