aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-03-15 13:59:14 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2020-03-16 10:38:31 +0100
commitf2d3807f580a86ca0bdc2b66aa9b4d2367c77a2e (patch)
treed72c486851501110f304f3d56960ca8a18f02771 /libphobos/libdruntime
parent6d44c881286762628afce5169d921a388ae6a1ff (diff)
downloadgcc-f2d3807f580a86ca0bdc2b66aa9b4d2367c77a2e.zip
gcc-f2d3807f580a86ca0bdc2b66aa9b4d2367c77a2e.tar.gz
gcc-f2d3807f580a86ca0bdc2b66aa9b4d2367c77a2e.tar.bz2
libphobos: Merge upstream druntime 6c45dd3a, phobos 68cc18adb.
Surrounds the gcc-style asm operands with parentheses, as the old style is now deprecated. Reviewed-on: https://github.com/dlang/druntime/pull/2986
Diffstat (limited to 'libphobos/libdruntime')
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/core/cpuid.d36
2 files changed, 21 insertions, 17 deletions
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index 0e2c5d1..54ae72f 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-7915b6a399fbb6d9c0db351eb5a8fda7e43fe8c5
+6c45dd3a6523a21887cb9a883eeb3abd40375dc1
The first line of this file holds the git revision number of the last
merge done from the dlang/druntime repository.
diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index f684657..d35e7d5 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -510,7 +510,7 @@ void getcacheinfoCPUID2()
uint numinfos = 1;
do {
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a[0], "=b" a[1], "=c" a[2], "=d" a[3] : "a" 2;
+ "cpuid" : "=a" (a[0]), "=b" (a[1]), "=c" (a[2]), "=d" (a[3]) : "a" (2);
} else asm pure nothrow @nogc {
mov EAX, 2;
cpuid;
@@ -554,7 +554,7 @@ void getcacheinfoCPUID4()
for (;;) {
uint a, b, number_of_sets;
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=b" b, "=c" number_of_sets : "a" 4, "c" cachenum : "edx";
+ "cpuid" : "=a" (a), "=b" (b), "=c" (number_of_sets) : "a" (4), "c" (cachenum) : "edx";
} else asm pure nothrow @nogc {
mov EAX, 4;
mov ECX, cachenum;
@@ -594,7 +594,7 @@ void getAMDcacheinfo()
{
uint dummy, c5, c6, d6;
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" dummy, "=c" c5 : "a" 0x8000_0005 : "ebx", "edx";
+ "cpuid" : "=a" (dummy), "=c" (c5) : "a" (0x8000_0005) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0005; // L1 cache
cpuid;
@@ -613,7 +613,7 @@ void getAMDcacheinfo()
ubyte numcores = 1;
if (max_extended_cpuid >= 0x8000_0008) {
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" dummy, "=c" numcores : "a" 0x8000_0008 : "ebx", "edx";
+ "cpuid" : "=a" (dummy), "=c" (numcores) : "a" (0x8000_0008) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0008;
cpuid;
@@ -624,7 +624,7 @@ void getAMDcacheinfo()
}
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" dummy, "=c" c6, "=d" d6 : "a" 0x8000_0006 : "ebx";
+ "cpuid" : "=a" (dummy), "=c" (c6), "=d" (d6) : "a" (0x8000_0006) : "ebx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0006; // L2/L3 cache
cpuid;
@@ -653,7 +653,7 @@ void getCpuInfo0B()
uint a, b, c, d;
do {
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=b" b, "=c" c, "=d" d : "a" 0x0B, "c" level;
+ "cpuid" : "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (0x0B), "c" (level);
} else asm pure nothrow @nogc {
mov EAX, 0x0B;
mov ECX, level;
@@ -686,8 +686,10 @@ void cpuidX86()
uint* venptr = cast(uint*)cf.vendorID.ptr;
version (GNU)
{
- asm pure nothrow @nogc { "cpuid" : "=a" max_cpuid, "=b" venptr[0], "=d" venptr[1], "=c" venptr[2] : "a" 0; }
- asm pure nothrow @nogc { "cpuid" : "=a" max_extended_cpuid : "a" 0x8000_0000 : "ebx", "ecx", "edx"; }
+ asm pure nothrow @nogc {
+ "cpuid" : "=a" (max_cpuid), "=b" (venptr[0]), "=d" (venptr[1]), "=c" (venptr[2]) : "a" (0);
+ "cpuid" : "=a" (max_extended_cpuid) : "a" (0x8000_0000) : "ebx", "ecx", "edx";
+ }
}
else
{
@@ -730,7 +732,7 @@ void cpuidX86()
cf.probablyAMD = cf.vendorID == "AuthenticAMD";
uint apic = 0; // brand index, apic id
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=b" apic, "=c" cf.miscfeatures, "=d" cf.features : "a" 1;
+ "cpuid" : "=a" (a), "=b" (apic), "=c" (cf.miscfeatures), "=d" (cf.features) : "a" (1);
} else {
asm pure nothrow @nogc {
mov EAX, 1; // model, stepping
@@ -753,7 +755,7 @@ void cpuidX86()
if (max_cpuid >= 7)
{
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=b" cf.extfeatures, "=c" c : "a" 7, "c" 0 : "edx";
+ "cpuid" : "=a" (a), "=b" (cf.extfeatures), "=c" (c) : "a" (7), "c" (0) : "edx";
} else {
uint ext;
asm pure nothrow @nogc {
@@ -769,7 +771,7 @@ void cpuidX86()
if (cf.miscfeatures & OSXSAVE_BIT)
{
version (GNU) asm pure nothrow @nogc {
- "xgetbv" : "=a" a, "=d" d : "c" 0;
+ "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
} else asm pure nothrow @nogc {
mov ECX, 0;
xgetbv;
@@ -783,7 +785,7 @@ void cpuidX86()
cf.amdmiscfeatures = 0;
if (max_extended_cpuid >= 0x8000_0001) {
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=c" cf.amdmiscfeatures, "=d" cf.amdfeatures : "a" 0x8000_0001 : "ebx";
+ "cpuid" : "=a" (a), "=c" (cf.amdmiscfeatures), "=d" (cf.amdfeatures) : "a" (0x8000_0001) : "ebx";
} else {
asm pure nothrow @nogc {
mov EAX, 0x8000_0001;
@@ -804,7 +806,7 @@ void cpuidX86()
if (hyperThreadingBit) {
// determine max number of cores for AMD
version (GNU) asm pure nothrow @nogc {
- "cpuid" : "=a" a, "=c" c : "a" 0x8000_0008 : "ebx", "edx";
+ "cpuid" : "=a" (a), "=c" (c) : "a" (0x8000_0008) : "ebx", "edx";
} else asm pure nothrow @nogc {
mov EAX, 0x8000_0008;
cpuid;
@@ -818,9 +820,11 @@ void cpuidX86()
uint* pnb = cast(uint*)cf.processorNameBuffer.ptr;
version (GNU)
{
- asm pure nothrow @nogc { "cpuid" : "=a" pnb[0], "=b" pnb[1], "=c" pnb[ 2], "=d" pnb[ 3] : "a" 0x8000_0002; }
- asm pure nothrow @nogc { "cpuid" : "=a" pnb[4], "=b" pnb[5], "=c" pnb[ 6], "=d" pnb[ 7] : "a" 0x8000_0003; }
- asm pure nothrow @nogc { "cpuid" : "=a" pnb[8], "=b" pnb[9], "=c" pnb[10], "=d" pnb[11] : "a" 0x8000_0004; }
+ asm pure nothrow @nogc {
+ "cpuid" : "=a" (pnb[0]), "=b" (pnb[1]), "=c" (pnb[ 2]), "=d" (pnb[ 3]) : "a" (0x8000_0002);
+ "cpuid" : "=a" (pnb[4]), "=b" (pnb[5]), "=c" (pnb[ 6]), "=d" (pnb[ 7]) : "a" (0x8000_0003);
+ "cpuid" : "=a" (pnb[8]), "=b" (pnb[9]), "=c" (pnb[10]), "=d" (pnb[11]) : "a" (0x8000_0004);
+ }
}
else version (D_InlineAsm_X86)
{