Commit graph

67 commits

Author SHA1 Message Date
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Martin Kinkelin
e96b1e5679 Keep AST expressions of DMD-style inline asm arguments alive 2019-03-02 21:19:44 +01:00
Martin Kinkelin
32ecbdd266 Upgrade front-end & libs to v2.084.0-beta.1 2018-12-18 02:31:57 +01: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
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 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
43296da0a2 Upgrade to upstream stable (0c4d5bb5) 2018-05-31 17:22:09 +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
Martin
fb7fd86d97 Merge branch 'master' into merge-2.079
Conflicts:
	runtime/druntime
	runtime/phobos
2018-04-21 16:01:26 +02:00
Martin Kinkelin
7b3f7afdeb
MSVC: Fix extended ptr semantics in DMD-style inline asm (#2653)
Don't map Extended_Ptr to Double_Ptr for MSVC targets with 64-bit reals.
Instead, map reals to Double_Ptr directly, thereby still allowing to
work with 80-bit extended precision values via `extended ptr`.
2018-04-15 18:57:53 +02:00
Martin
025c69cc65 Merge branch 'master' into merge-2.079
Conflicts:
	appveyor.yml
	driver/main.cpp
	runtime/druntime
	runtime/phobos
2018-04-15 18:46:39 +02:00
Martin
ddad58f08c DMD-style inline asm: Add missing EIP register 2018-04-15 16:44:49 +01:00
Martin Kinkelin
ecbc36d372
Win32: Add extra underscore for mangled names of D symbols (#2598)
DMD 2.079 introduces this breaking ABI change. Just like on 32-bit OSX,
the mangled names of D symbols now include the platform-specific
underscore prefix.
2018-04-02 02:27:09 +02:00
Martin
df4f854dd5 Upgrade to D v2.079.0-beta.1 2018-02-20 02:04:41 +01:00
Johan Engelen
94dffbe5aa Error on data definition directives inside inline asm. (#2550) 2018-02-02 23:17:23 +00:00
Martin
ad89009d6e Merge 2.077.0 front-end and stdlibs 2017-11-05 18:41:55 +01:00
Martin
10c44dd0b7 Merge branch 'master' into merge-2.076
Conflicts:
	runtime/phobos
2017-10-19 01:08:26 +02:00
kinke
c6583565c0 DMD-style inline asm: Add s suffix for fild etc. with 16-bit memory operand (#2359)
Needed for Win64 with 80-bit reals (i.e., MinGW) here (Win64-specific):
882449f791/std/math.d (L3691)
2017-10-17 19:46:41 +02:00
Martin
d16a8060b4 Merge 2.076.0 front-end and stdlibs
Biggest changes:

* idgen.d has been replaced by a CTFE implementation, id.d.
  I manually added a C++ header declaring the symbols we need and
  adapted (simplified) the CMake script accordingly.
* More semantic() methods have been extracted as visitors; most notably
  for expressions.
2017-10-07 18:49:50 +02:00
Martin
0b28925e9a Win32: Remove extra leading underscore from D symbol mangling
This is compatible with DMD.
2017-10-07 14:06:17 +02:00
Martin
41aae46b91 Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-09-12 19:44:53 +02:00
David Nadlinger
3a12937e04 gen/asm-x86: Remove old piece of GDC-only code 2017-08-27 20:33:22 +01:00
David Nadlinger
0452e05985 gen/asm-x86: Straightened out some convoluted logic 2017-08-27 20:33:22 +01:00
David Nadlinger
0e29ee0168 gen/asm-x86: Re-clang-format
Unfortunately, it still doesn't interpret the weird comment style in the
opcode table correctly, so added some exclusion comments for now.
2017-08-27 20:33:22 +01:00
Martin
980c5620ec Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-08-04 22:43:16 +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
2616261fd2 Revise all LDC-specific errors/warnings/deprecs and insert backticks
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +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
Johan Engelen
463e53b9ac Apply DDMD PR #5885 (f5f9150ea57cce5fabb43c79ff1b187d34d37044).
This fixes incorrect overriding of class methods and gets rid of many C++ warnings.
2016-07-25 15:25:01 +02:00
David Nadlinger
9f998a398d Initial merge of upstream v2.071.0-b2
Notably, the glue layer side of the changed multiple interface
inheritance layout (DMD a54e89d) has not been implemented yet.

This corresponds to DMD commit 3f6a763c0589dd03c1c206eafd434b593702564e.
2016-04-03 15:15:14 +01:00
Kai Nacke
eb394bf221 Merge remote-tracking branch 'origin/ltsmaster' into mastertest 2016-03-08 20:20:24 +01:00
Kai Nacke
c1afac1646 Change description of some x64 instructions for inline assembler.
`Dst` means overwrites target, `Upd` means that new target value depends
on old value of target.

This hides the failure from #1292 but does not fix the root cause.
2016-03-05 23:33:56 +01:00
Johan Engelen
29ce4012af dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
Also adds the CMake infrastructure to compile and link the D source files.

The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00
Martin
dc43d670b5 Re-clang-format gen/asm-x86.h after some manual tweaks
Commented lines preceding any #if preprocessor directives get aligned at
the #if indentation, i.e., column 0 in most cases, but are seldomly
directly related to the #if directive itself.

Here I use `#if 0` to comment out a large chunk of lines immediately
preceding an #if directive.
2015-11-07 17:55:30 +01:00
Martin
7cb65d6b94 Cosmetic fixes for gen/asm-x86.h 2015-11-05 19:47:11 +01:00
David Nadlinger
bb8ca94901 asm-x86: Tiny format fix 2015-11-03 01:41:26 +02:00
David Nadlinger
05d45350aa clang-tidy: Add readability-else-after-return 2015-11-02 11:30:40 +02:00
David Nadlinger
9df487edff gen/ir: clang-tidy the world 2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615 driver/gen/ir: clang-format the world
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
60d676e2a1 Drop support for LLVM < 3.5
This allows to clean up the code a little.
2015-10-30 22:24:05 +01:00
Kai Nacke
793f9d86ed Fix compiling on ARM with latest GCC.
ARM has unsigned chars vs. signed chars on X86. Assigning -1 to a
char results in a narrowing conversion which is an error since GCC 5.x.

The fix is to explicitly use a signed char.
2015-09-18 22:39:13 +02:00
Martin
eadeede5b0 DMD inline asm: allow labels as generic operands 2015-08-03 00:52:23 +02:00
David Nadlinger
21d1bab114 Merge branch 'master' into merge-2.067 2015-07-11 18:10:43 +02:00
Kai Nacke
801819dd3f Add error message for branch with segment prefix.
Fixes fail_compilation/fail12635.d
2015-05-30 23:00:34 +02:00
Kai Nacke
7eb6173ab5 Implement logical expressions in inline assembler.
Parsing and interpretation of logical expressions were missing.
This fixes fail_compilation/fail14009.d, too.
2015-05-30 16:48:09 +02:00
Martin
9ae1c68263 Inline assembly fix for MSVC: treat real ptr as 64-bit double. 2015-04-16 00:50:29 +02:00
kai
c39c7e9c35 Update to DMD v2.067.0-b2
Includes all tagged with v2.067.0-b2. Does not includes latest druntime changes from ldc (head) branch.

This is known to be broken. I only merged the frontend stuff but did not try to compile something...
2015-02-24 22:16:17 +01:00
kai
a2748cd2fd Merge current development state of 2.067
First merge of current development stream. Asm blocks are known to be broken.

DMD:      0c9f437bc24015707130ba42dc434d9cd58282fb
druntime: 86d49cfb3670904603df0cfdfe44c6fff565c0fc
Phobos:   a8ca4f7964becac680af0eadbde05aa7d10fc338
2014-11-15 18:53:23 +01:00
Martin
f00c488605 Win64: do not prepend extra underscore when mangling symbol names in inline assembly 2014-10-11 21:20:49 +02:00
Alexey Prokhin
68649882f4 Also move nakedUse from VarDeclaration to IrGlobal 2014-10-05 16:08:58 +04:00