Commit graph

166 commits

Author SHA1 Message Date
Harry Gillanders
4cff23d9a5
Support case-insensitive DMD-style inline assembly. (#4629) 2024-04-23 12:25:09 +02:00
Martin Kinkelin
9041c0bf67 Adapt to free functions in dmd C++ namespace now 2024-03-03 19:14:00 +01:00
Martin Kinkelin
d6d79187e6 Merge fix: Adapt to removed error/warning members 2023-11-06 01:10:16 +01:00
Martin Kinkelin
8e60686bdd Fix DMD-style inline asm label mangling 2023-07-16 13:46:34 +02:00
Johan Engelen
51422dca53
Replace sprintf with safer snprintf, fixes compilation warning on newer clang versions. (#4304) 2023-01-25 00:55:10 +01:00
Nicholas Wilson
76e4c8319f
Provide indirect types to createInlineAsmCall (#4121) 2022-09-13 11:05:04 +08:00
Nicholas Wilson
f917d3d94c
Revert "Add D types to IRAsmStmt::Operands (#4138)" (#4140)
This reverts commit f4a4f76b89.
2022-09-12 14:10:52 +08:00
Nicholas Wilson
f4a4f76b89
Add D types to IRAsmStmt::Operands (#4138) 2022-09-12 12:14:51 +08:00
Nicholas Wilson
69a54c948c
asmstmt.cpp use IRAsmStmt instead of separate vars (#4129) 2022-09-10 18:20:27 +08:00
Nicholas Wilson
fdf1eba96a
Provide pointee type with gcc-asm to createInlineAsmCall (#4038) 2022-09-07 19:18:35 +08:00
Nicholas Wilson
2a3c93ddac
Unify in and out operands inCompoundAsmStatement_toIR (#4119) 2022-09-07 10:11:26 +08:00
Nicholas Wilson
e661b3f646
asmstmt.cpp: deduplicate remap_{in|out}args (#4118) 2022-09-07 09:21:08 +08:00
Nicholas Wilson
b30ee6110e
Refactor IRAsmStmt to unify in and out operands (#4116) 2022-09-07 08:30:54 +08:00
Nicholas Wilson
48aaaece30
Use typed load in asmstmt.cpp (#4103) 2022-09-03 10:47:27 +08:00
Nicholas Wilson
63f0644b49
Use typed load in asmstmt.cpp (#4102) 2022-09-03 09:27:58 +08:00
Martin Kinkelin
b7b8e59043 Upgrade frontend & libs to v2.100.0-beta.1+ (dlang/dmd@c0cff59c79) 2022-04-26 23:01:13 +02:00
Martin Kinkelin
2b6177fdc9 Fix LLVM 14 complaints about missing element type attributes for indirect asm operands 2022-03-30 15:00:07 +02:00
Martin Kinkelin
7b6810b01b Fix LLVM 13 deprecation messages during build 2022-02-26 19:15:46 +01:00
Martin Kinkelin
4bd8dcd91b Adapt to new TOK and EXP enum classes 2022-02-16 20:52:07 +01:00
Martin Kinkelin
9858cfb01c Simplify dmd/ldcbindings.{d,h} 2021-09-17 03:49:28 +02:00
Martin Kinkelin
369cfd13ce Adapt to TY enum class 2021-09-07 16:51:19 +02:00
Martin Kinkelin
a268b23469
Don't enforce the frame pointer for functions with GCC-style inline asm (#3685)
As GDC doesn't either.
2021-04-04 19:25:55 +02:00
Martin Kinkelin
69269f3bd9 Refactor IRScope handling
Replace the stack of IRScopes, each with its own IRBuilder, by directly
tampering with the state of a single IRBuilder.

This seems like the most feasible way to account for a breaking change
in LLVM 11, disallowing IRBuilder from being copied.
2020-09-26 01:04:50 +02:00
Martin Kinkelin
58df385de7 dmd-testsuite: Adapt a few tests for non-x86 archs
And improve the error message for DMD-style inline asm and non-x86
targets.
2020-05-03 17:39:31 +02:00
Martin Kinkelin
4629f156a7 Extend inline asm diagnostics by D source location 2020-02-25 02:31:58 +01:00
Martin Kinkelin
ebd359273d druntime: Switch from __asm to GCC-style asm syntax 2020-02-25 01:19:25 +01:00
Martin Kinkelin
c55fcfe3f3 Refactor GccAsmStatement_toIR into its own .cpp module 2020-02-15 23:58:14 +01:00
Martin Kinkelin
a25a576bba GCC-style asm: Support indirect output operands 2020-02-15 23:58:14 +01:00
Martin Kinkelin
9583f9bff9 GCC-style asm: Support multiple output operands 2020-02-15 23:58:14 +01:00
Martin Kinkelin
298898a0a7 Add support for GCC/GDC-style inline asm syntax 2020-02-15 23:58:13 +01:00
Martin Kinkelin
26673c174f
Refactoring: Replace Expression::op check followed by static cast to Expression::is<ExpressionType> (#3141)
This may negatively impact performance, as the (final, i.e.,
non-virtual) Expression::is... family is implemented in D and not
available inline in the C++ headers.
2020-01-15 12:54:05 +01:00
Martin Kinkelin
08b3ee3895
Refactoring: Modernize some legacy asmstmt code (#3225) 2019-12-20 16:58:19 +01:00
Fangrui Song
637a8af264 Fix -Wunused-variable (#3224) 2019-11-11 20:55:50 +01:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
fe9b8a124c Streamline LDC front-end diff
Primarily stylistically.
2019-04-13 20:58:05 +02:00
Martin Kinkelin
4a23399236 Aim for consistent #includes (order + dir prefix)
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
e0611c3114 Adapt to now subtyped class AsmStatement 2018-08-18 00:33:48 +02:00
Martin Kinkelin
52d8c78efb
Fix inline asm label naming issue in overloaded functions (#2694)
Fixes #2667.
2018-05-10 21:17:34 +02:00
Johan Engelen
f82d6fe953
Clarify that error messages relate only to DMD-style asm. (#2633) 2018-03-30 18:20:15 +02:00
Johan Engelen
92d8062836 Fix a few compiler warnings (#2248)
* Remove default label in switch which covers all enumeration values.

This fixes the warning "default label in switch which covers all enumeration values". We will already get a warning when _not_ all enumeration values are covered.
This is the last warning left on OSX/Clang, so with this change, we can build with -Werror.

* Fix warning: enumeral and non-enumeral type in conditional expression

* Fix warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 5

* "fallthrough" is recognized by the compiler warning system
2017-08-04 12:05:36 +02:00
Martin
383c2d3a59 Range-ify usages of front-end Arrays 2017-06-04 00:29:44 +02:00
Martin
dca21939e1 Merge 2.072.2 front-end
The part needing most attention was ddmd.root.ctfloat, ddmd.target (incl.
gen/target.cpp) and ddmd.builtin. The front-end is now prepared for
elaborate compile-time floating-point types to allow for proper cross-
compilation.

This version still uses the host's `real` type for compile-time reals,
except for MSVC hosts, which still use 64-bit doubles (when compiled with
DMD host compiler too).

Some other changes:

* semantic*() of Statements extracted from statement.d to statementsem.d
* mangle() -> mangleToBuffer()
* Identifier::string -> toChars()
* Token::float80value => floatvalue
* Dsymbol::isAggregateMember() => isMember()
* BoolExp is no more
* ddmd.root.ctfloat: LDC-specific CTFE builtins
2017-01-29 15:48:03 +01:00
Martin
e711deac1b Refactor basic block construction and revise BB order 2016-08-06 22:04:41 +02:00
Martin
039560bd83 Introduce DtoRVal/DtoLVal convenience functions
No functional changes intended.
2016-06-13 22:30:13 +02:00
Kai Nacke
eb394bf221 Merge remote-tracking branch 'origin/ltsmaster' into mastertest 2016-03-08 20:20:24 +01:00
Kai Nacke
56cf6b9d4f Increment counter for output constraints.
This fixes issue #1292.
2016-03-06 00:06:48 +01:00
Kai Nacke
24adf155ff Revert "Revert "Merge branch 'ltsmaster'""
This reverts commit 1653911600.
2016-03-03 21:12:53 +01:00
Kai Nacke
1653911600 Revert "Merge branch 'ltsmaster'"
This reverts commit dcb781004b, reversing
changes made to 3c6f09faf0.
2016-03-03 13:14:39 +01:00
Kai Nacke
dcb781004b Merge branch 'ltsmaster' 2016-03-03 07:50:17 +01:00
Dan Olson
7cba1a45af Fix non-x86 __traits compiles for dmd inline asm
Allow asm statement to be tested in a __traits compiles check without
fataling for those targets that don't support dmd style inline asm.
Without this, a compile could exit(1) without any messages.

Fixes compilable/test12979b.d and runnable/testsafe.d on ARM.
2016-02-25 19:52:23 +00:00