-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-Added-PowerNex-as-target.patch
488 lines (459 loc) · 20.1 KB
/
0001-Added-PowerNex-as-target.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
From 3af920388c01409233ef2cbd036fe511f1fbdae3 Mon Sep 17 00:00:00 2001
From: Dan Printzell <[email protected]>
Date: Fri, 17 Jan 2020 01:46:53 +0100
Subject: [PATCH 1/4] Added PowerNex as target
Signed-off-by: Dan Printzell <[email protected]>
---
src/dmd/backend/backconfig.d | 28 +++++++++++++++++++++++-----
src/dmd/backend/cdef.d | 15 ++++++++++-----
src/dmd/backend/cod1.d | 17 +++++++++--------
src/dmd/backend/cod3.d | 2 +-
src/dmd/backend/code_x86.d | 1 -
src/dmd/backend/elfobj.d | 3 ++-
src/dmd/backend/os.d | 14 ++++++++++++++
src/dmd/cli.d | 9 +++++++--
src/dmd/json.d | 4 ++++
src/dmd/lib.d | 2 +-
src/dmd/mars.d | 6 +++---
src/dmd/target.d | 19 ++++++++++---------
test/tools/paths.d | 2 ++
13 files changed, 86 insertions(+), 36 deletions(-)
diff --git a/src/dmd/backend/backconfig.d b/src/dmd/backend/backconfig.d
index cd4ec9cee..a3282444a 100644
--- a/src/dmd/backend/backconfig.d
+++ b/src/dmd/backend/backconfig.d
@@ -258,6 +258,25 @@ if (config.exe & (EX_SOLARIS | EX_SOLARIS))
config.objfmt = OBJ_ELF;
config.ehmethod = useExceptions ? EHmethod.EH_DM : EHmethod.EH_NONE;
}
+static if (TARGET_POWERNEX)
+{
+ // Based on TARGET_LINUX
+ // 32bit is not supported!
+ assert(model == 64);
+ config.exe = EX_POWERNEX64;
+ config.ehmethod = useExceptions ? EHmethod.EH_DWARF : EHmethod.EH_NONE;
+ config.fpxmmregs = true;
+ config.avx = avx;
+
+ config.flags |= CFGnoebp;
+ if (!exe)
+ {
+ config.flags3 |= CFG3pic;
+ config.flags |= CFGalwaysframe; // PIC needs a frame for TLS fixups
+ }
+ config.objfmt = OBJ_ELF;
+}
+
config.flags2 |= CFG2nodeflib; // no default library
config.flags3 |= CFG3eseqds;
static if (0)
@@ -415,7 +434,7 @@ void util_set32()
_tysize[TYnullptr] = LONGSIZE;
_tysize[TYnptr] = LONGSIZE;
_tysize[TYnref] = LONGSIZE;
-if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64))
+if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64 | EX_POWERNEX64))
{
_tysize[TYldouble] = 12;
_tysize[TYildouble] = 12;
@@ -446,7 +465,7 @@ if (config.exe & EX_windos)
_tyalignsize[TYnullptr] = LONGSIZE;
_tyalignsize[TYnref] = LONGSIZE;
_tyalignsize[TYnptr] = LONGSIZE;
-if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64))
+if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64 | EX_POWERNEX64))
{
_tyalignsize[TYldouble] = 4;
_tyalignsize[TYildouble] = 4;
@@ -502,7 +521,7 @@ void util_set64()
_tysize[TYnptr] = 8;
_tysize[TYnref] = 8;
if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD |
- EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64 | EX_OSX | EX_OSX64))
+ EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64 | EX_OSX | EX_OSX64 | EX_POWERNEX64))
{
_tysize[TYldouble] = 16;
_tysize[TYildouble] = 16;
@@ -526,7 +545,7 @@ void util_set64()
_tyalignsize[TYnullptr] = 8;
_tyalignsize[TYnptr] = 8;
_tyalignsize[TYnref] = 8;
- if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64))
+ if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS | EX_SOLARIS64 | EX_POWERNEX64))
{
_tyalignsize[TYldouble] = 16;
_tyalignsize[TYildouble] = 16;
@@ -566,4 +585,3 @@ void util_set64()
_tyalignsize[TYrestrictPtr] = _tyalignsize[TYnptr];
_tyalignsize[TYfgPtr] = _tyalignsize[TYnptr];
}
-
diff --git a/src/dmd/backend/cdef.d b/src/dmd/backend/cdef.d
index 12bf2f86a..af772d531 100644
--- a/src/dmd/backend/cdef.d
+++ b/src/dmd/backend/cdef.d
@@ -41,7 +41,8 @@ version (XVERSION)
{
extern (D) template xversion(string s)
{
- enum xversion = mixin(`{ version (` ~ s ~ `) return true; else return false; }`)();
+ //enum xversion = mixin(`{ version (` ~ s ~ `) return true; else return false; }`)();
+ enum xversion = s == "PowerNex";
}
enum TARGET_LINUX = xversion!`linux`;
@@ -51,6 +52,7 @@ version (XVERSION)
enum TARGET_SOLARIS = xversion!`Solaris`;
enum TARGET_WINDOS = xversion!`Windows`;
enum TARGET_DRAGONFLYBSD = xversion!`DragonFlyBSD`;
+ enum TARGET_POWERNEX = xversion!`PowerNex`;
}
@@ -491,6 +493,7 @@ enum
EX_OPENBSD = 0x400000,
EX_OPENBSD64 = 0x800000,
EX_DRAGONFLYBSD64 = 0x1000000,
+ EX_POWERNEX64 = 0x2000000
}
// All of them
@@ -515,7 +518,8 @@ enum exefmt_t EX_all =
EX_SOLARIS64 |
EX_OPENBSD |
EX_OPENBSD64 |
- EX_DRAGONFLYBSD64;
+ EX_DRAGONFLYBSD64 |
+ EX_POWERNEX64;
// All segmented memory models
enum exefmt_t EX_segmented = EX_DOSX | EX_ZPM | EX_RATIONAL | EX_PHARLAP |
@@ -537,7 +541,8 @@ enum exefmt_t EX_posix = EX_LINUX | EX_LINUX64 |
EX_FREEBSD | EX_FREEBSD64 |
EX_SOLARIS | EX_SOLARIS64 |
EX_OPENBSD | EX_OPENBSD64 |
- EX_DRAGONFLYBSD64;
+ EX_DRAGONFLYBSD64 |
+ EX_POWERNEX64;
// All 16 bit targets
enum exefmt_t EX_16 = EX_ZPM | EX_RATIONAL | EX_COM | EX_OS1 | EX_MZ;
@@ -559,7 +564,8 @@ enum exefmt_t EX_64 =
EX_FREEBSD64 |
EX_SOLARIS64 |
EX_OPENBSD64 |
- EX_DRAGONFLYBSD64;
+ EX_DRAGONFLYBSD64 |
+ EX_POWERNEX64;
// Constraints
static assert(EX_all == (EX_segmented ^ EX_flat));
@@ -979,4 +985,3 @@ enum
int ClassInline(int c) { return c == SCinline || c == SCsinline || c == SCeinline; }
int SymInline(Symbol* s) { return ClassInline(s.Sclass); }
-
diff --git a/src/dmd/backend/cod1.d b/src/dmd/backend/cod1.d
index 194610e57..02b5506ba 100644
--- a/src/dmd/backend/cod1.d
+++ b/src/dmd/backend/cod1.d
@@ -2125,7 +2125,8 @@ void getClibInfo(uint clib, Symbol** ps, ClibInfo** pinfo)
EX_FREEBSD | EX_FREEBSD64 |
EX_OPENBSD | EX_OPENBSD64 |
EX_DRAGONFLYBSD64 |
- EX_SOLARIS | EX_SOLARIS64);
+ EX_SOLARIS | EX_SOLARIS64 |
+ EX_POWERNEX64);
ClibInfo* cinfo = &clibinfo[clib];
Symbol* s = clibsyms[clib];
@@ -2152,7 +2153,7 @@ void getClibInfo(uint clib, Symbol** ps, ClibInfo** pinfo)
case CLIB.ldiv:
cinfo.retregs16 = mDX|mAX;
- if (config.exe & (EX_LINUX | EX_FREEBSD))
+ if (config.exe & (EX_LINUX | EX_FREEBSD | EX_POWERNEX64))
{
s = symboly("__divdi3", mAX|mBX|mCX|mDX);
cinfo.flags = INFpushebx;
@@ -2180,7 +2181,7 @@ void getClibInfo(uint clib, Symbol** ps, ClibInfo** pinfo)
case CLIB.lmod:
cinfo.retregs16 = mCX|mBX;
- if (config.exe & (EX_LINUX | EX_FREEBSD))
+ if (config.exe & (EX_LINUX | EX_FREEBSD | EX_POWERNEX64))
{
s = symboly("__moddi3", mAX|mBX|mCX|mDX);
cinfo.flags = INFpushebx;
@@ -2208,7 +2209,7 @@ void getClibInfo(uint clib, Symbol** ps, ClibInfo** pinfo)
case CLIB.uldiv:
cinfo.retregs16 = mDX|mAX;
- if (config.exe & (EX_LINUX | EX_FREEBSD))
+ if (config.exe & (EX_LINUX | EX_FREEBSD | EX_POWERNEX64))
{
s = symboly("__udivdi3", mAX|mBX|mCX|mDX);
cinfo.flags = INFpushebx;
@@ -2236,7 +2237,7 @@ void getClibInfo(uint clib, Symbol** ps, ClibInfo** pinfo)
case CLIB.ulmod:
cinfo.retregs16 = mCX|mBX;
- if (config.exe & (EX_LINUX | EX_FREEBSD))
+ if (config.exe & (EX_LINUX | EX_FREEBSD | EX_POWERNEX64))
{
s = symboly("__umoddi3", mAX|mBX|mCX|mDX);
cinfo.flags = INFpushebx;
@@ -2858,7 +2859,7 @@ void callclib(ref CodeBuilder cdb, elem* e, uint clib, regm_t* pretregs, regm_t
}
if (pushebx)
{
- if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64))
+ if (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_POWERNEX64))
{
cdb.gen1(0x50 + CX); // PUSH ECX
cdb.gen1(0x50 + BX); // PUSH EBX
@@ -2879,7 +2880,7 @@ void callclib(ref CodeBuilder cdb, elem* e, uint clib, regm_t* pretregs, regm_t
cdb.gen1(0x50 + DX); // PUSH EDX
cdb.gen1(0x50 + AX); // PUSH EAX
}
- if (config.exe & (EX_LINUX | EX_FREEBSD | EX_OPENBSD | EX_SOLARIS))
+ if (config.exe & (EX_LINUX | EX_FREEBSD | EX_OPENBSD | EX_SOLARIS | EX_POWERNEX64))
{
// Note: not for OSX
/* Pass EBX on the stack instead, this is because EBX is used
@@ -3332,7 +3333,7 @@ void cdfunc(ref CodeBuilder cdb, elem* e, regm_t* pretregs)
/* Assume called function access statics
*/
- if (config.exe & (EX_LINUX | EX_LINUX64 | EX_OSX | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64) &&
+ if (config.exe & (EX_LINUX | EX_LINUX64 | EX_OSX | EX_FREEBSD | EX_FREEBSD64 | EX_OPENBSD | EX_OPENBSD64 | EX_POWERNEX64) &&
config.flags3 & CFG3pic)
cgstate.accessedTLS = true;
diff --git a/src/dmd/backend/cod3.d b/src/dmd/backend/cod3.d
index 62f7a79bc..812ccb4d5 100644
--- a/src/dmd/backend/cod3.d
+++ b/src/dmd/backend/cod3.d
@@ -2137,7 +2137,7 @@ void outjmptab(block *b)
break;
}
}
- if (config.exe & (EX_LINUX64 | EX_FREEBSD64 | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS64))
+ if (config.exe & (EX_LINUX64 | EX_FREEBSD64 | EX_OPENBSD64 | EX_DRAGONFLYBSD64 | EX_SOLARIS64 | EX_POWERNEX64))
{
if (config.flags3 & CFG3pic)
{
diff --git a/src/dmd/backend/code_x86.d b/src/dmd/backend/code_x86.d
index 5904047af..d1dff33e6 100644
--- a/src/dmd/backend/code_x86.d
+++ b/src/dmd/backend/code_x86.d
@@ -577,4 +577,3 @@ void getlvalue_msw(code *);
void getlvalue_lsw(code *);
void getlvalue(ref CodeBuilder cdb, code *pcs, elem *e, regm_t keepmsk);
void loadea(ref CodeBuilder cdb, elem *e, code *cs, uint op, uint reg, targ_size_t offset, regm_t keepmsk, regm_t desmsk);
-
diff --git a/src/dmd/backend/elfobj.d b/src/dmd/backend/elfobj.d
index a9cb6c219..b7c22f1d9 100644
--- a/src/dmd/backend/elfobj.d
+++ b/src/dmd/backend/elfobj.d
@@ -86,7 +86,7 @@ else
enum DMDV2 = false;
bool REQUIRE_DSO_REGISTRY()
{
- return DMDV2 && (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_DRAGONFLYBSD64));
+ return DMDV2 && (config.exe & (EX_LINUX | EX_LINUX64 | EX_FREEBSD | EX_FREEBSD64 | EX_DRAGONFLYBSD64 | EX_POWERNEX64));
}
/**
@@ -1269,6 +1269,7 @@ void ElfObj_term(const(char)* objfilename)
case EX_SOLARIS:
case EX_SOLARIS64:
case EX_DRAGONFLYBSD64:
+ case EX_POWERNEX64:
ELFOSABI = ELFOSABI_SYSV;
break;
diff --git a/src/dmd/backend/os.d b/src/dmd/backend/os.d
index ac428cac3..b19a425e7 100644
--- a/src/dmd/backend/os.d
+++ b/src/dmd/backend/os.d
@@ -981,6 +981,20 @@ int os_critsecsize64()
}
}
+else version(PowerNex)
+{
+int os_critsecsize32()
+{
+ assert(0);
+ return 0;
+}
+
+int os_critsecsize64()
+{
+ return 40;
+}
+}
+
/* This is the magic program to get the size on Posix systems:
#if 0
diff --git a/src/dmd/cli.d b/src/dmd/cli.d
index b3e813289..82fb72077 100644
--- a/src/dmd/cli.d
+++ b/src/dmd/cli.d
@@ -31,10 +31,11 @@ enum TargetOS : ubyte
FreeBSD = 0x10,
Solaris = 0x20,
DragonFlyBSD = 0x40,
+ PowerNex = 0x80,
// Combination masks
- all = linux | Windows | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD,
- Posix = linux | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD,
+ all = linux | Windows | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD | PowerNex,
+ Posix = linux | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD | PowerNex,
}
// Detect the current TargetOS
@@ -66,6 +67,10 @@ else version(Solaris)
{
private enum targetOS = TargetOS.Solaris;
}
+else version(PowerNex)
+{
+ private enum targetOS = TargetOS.PowerNex;
+}
else
{
private enum targetOS = TargetOS.all;
diff --git a/src/dmd/json.d b/src/dmd/json.d
index a187571f3..fbad711d7 100644
--- a/src/dmd/json.d
+++ b/src/dmd/json.d
@@ -868,6 +868,10 @@ public:
item("solaris");
item("bsd");
}
+ else if (target.os == Target.OS.PowerNex)
+ {
+ item("powernex");
+ }
}
arrayEnd();
diff --git a/src/dmd/lib.d b/src/dmd/lib.d
index 1acbe39f0..fdfa7bdc3 100644
--- a/src/dmd/lib.d
+++ b/src/dmd/lib.d
@@ -40,7 +40,7 @@ class Library
{
return (target.mscoff || target.is64bit) ? LibMSCoff_factory() : LibOMF_factory();
}
- else if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ else if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
{
return LibElf_factory();
}
diff --git a/src/dmd/mars.d b/src/dmd/mars.d
index a7e85981a..5f9e09d37 100644
--- a/src/dmd/mars.d
+++ b/src/dmd/mars.d
@@ -1235,7 +1235,7 @@ private void setDefaultLibrary()
else
global.params.defaultlibname = "phobos";
}
- else if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ else if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
{
global.params.defaultlibname = "libphobos2.a";
}
@@ -2504,7 +2504,7 @@ private void reconcileCommands(ref Param params)
error(Loc.initial, "`-m32` is not supported on DragonFlyBSD, it is 64-bit only");
}
- if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ if (target.os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
{
if (params.lib && params.dll)
error(Loc.initial, "cannot mix `-lib` and `-shared`");
@@ -2723,7 +2723,7 @@ Module createModule(const(char)* file, ref Strings libmodules)
libmodules.push(file);
return null;
}
- if (target.os & (Target.OS.linux | Target.OS.OSX| Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ if (target.os & (Target.OS.linux | Target.OS.OSX| Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
{
if (FileName.equals(ext, target.dll_ext))
{
diff --git a/src/dmd/target.d b/src/dmd/target.d
index d11bfbec0..d7f5d951d 100644
--- a/src/dmd/target.d
+++ b/src/dmd/target.d
@@ -113,10 +113,11 @@ extern (C++) struct Target
FreeBSD = 0x10,
Solaris = 0x20,
DragonFlyBSD = 0x40,
+ PowerNex = 0x80,
// Combination masks
- all = linux | Windows | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD,
- Posix = linux | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD,
+ all = linux | Windows | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD | PowerNex,
+ Posix = linux | OSX | OpenBSD | FreeBSD | Solaris | DragonFlyBSD | PowerNex,
}
OS os = defaultTargetOS();
@@ -219,7 +220,7 @@ extern (C++) struct Target
ptrsize = 8;
classinfosize = 0x98; // 152
}
- if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris))
+ if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris | Target.OS.PowerNex))
{
realsize = 12;
realpad = 2;
@@ -248,7 +249,7 @@ extern (C++) struct Target
assert(0);
if (is64bit)
{
- if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris))
+ if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris | Target.OS.PowerNex))
{
realsize = 16;
realpad = 6;
@@ -1181,7 +1182,7 @@ struct TargetC
extern (D) void initialize(ref const Param params, ref const Target target)
{
const os = target.os;
- if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris))
+ if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris | Target.OS.PowerNex))
longsize = 4;
else if (os == Target.OS.OSX)
longsize = 4;
@@ -1191,7 +1192,7 @@ struct TargetC
assert(0);
if (target.is64bit)
{
- if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris))
+ if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris | Target.OS.PowerNex))
longsize = 8;
else if (os == Target.OS.OSX)
longsize = 8;
@@ -1264,7 +1265,7 @@ struct TargetCPP
extern (D) void initialize(ref const Param params, ref const Target target)
{
const os = target.os;
- if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris))
+ if (os & (Target.OS.linux | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.DragonFlyBSD | Target.OS.Solaris | Target.OS.PowerNex))
twoDtorInVtable = true;
else if (os == Target.OS.OSX)
twoDtorInVtable = true;
@@ -1296,7 +1297,7 @@ struct TargetCPP
*/
extern (C++) const(char)* toMangle(Dsymbol s)
{
- if (target.os & (Target.OS.linux | Target.OS.OSX | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ if (target.os & (Target.OS.linux | Target.OS.OSX | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
return toCppMangleItanium(s);
if (target.os == Target.OS.Windows)
return toCppMangleMSVC(s);
@@ -1313,7 +1314,7 @@ struct TargetCPP
*/
extern (C++) const(char)* typeInfoMangle(ClassDeclaration cd)
{
- if (target.os & (Target.OS.linux | Target.OS.OSX | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD))
+ if (target.os & (Target.OS.linux | Target.OS.OSX | Target.OS.FreeBSD | Target.OS.OpenBSD | Target.OS.Solaris | Target.OS.DragonFlyBSD | Target.OS.PowerNex))
return cppTypeInfoMangleItanium(cd);
if (target.os == Target.OS.Windows)
return cppTypeInfoMangleMSVC(cd);
diff --git a/test/tools/paths.d b/test/tools/paths.d
index 863612753..fbd0437d6 100644
--- a/test/tools/paths.d
+++ b/test/tools/paths.d
@@ -27,6 +27,8 @@ else version (Solaris)
enum os = "solaris";
else version (SunOS)
enum os = "solaris";
+else version (PowerNex)
+ enum os = "powernex";
else
static assert(0, "Unrecognized or unsupported OS.");
--
2.32.0