diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-11-10 07:26:18 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-11-10 07:26:18 -0800 |
commit | 8d703821c69062c0cd255787d793e44f1a95d463 (patch) | |
tree | 6b1df9cdc36cc47b6164db69a14bc86a63dc77c6 /libphobos | |
parent | 9cd320ea6572c577cdf17ce1f9ea5230b166af6d (diff) | |
parent | cf392dbdf17e38026f8e3c0e9af7f5b87f63be56 (diff) | |
download | gcc-8d703821c69062c0cd255787d793e44f1a95d463.zip gcc-8d703821c69062c0cd255787d793e44f1a95d463.tar.gz gcc-8d703821c69062c0cd255787d793e44f1a95d463.tar.bz2 |
Merge from trunk revision cf392dbdf17e38026f8e3c0e9af7f5b87f63be56.
Diffstat (limited to 'libphobos')
-rw-r--r-- | libphobos/ChangeLog | 14 | ||||
-rw-r--r-- | libphobos/libdruntime/MERGE | 2 | ||||
-rw-r--r-- | libphobos/libdruntime/config/mips/switchcontext.S | 24 | ||||
-rw-r--r-- | libphobos/libdruntime/rt/critical_.d | 18 |
4 files changed, 45 insertions, 13 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog index d8c9914..56a796b 100644 --- a/libphobos/ChangeLog +++ b/libphobos/ChangeLog @@ -1,3 +1,17 @@ +2020-10-27 Iain Buclaw <ibuclaw@gdcproject.org> + + * libdruntime/MERGE: Merge upstream druntime 58560d51. + +2020-10-12 Maciej W. Rozycki <macro@linux-mips.org> + + * libdruntime/config/mips/switchcontext.S [__mips_hard_float]: + Use L.D and S.D generic assembly instructions rather than LDC1 + and SDC1 MIPS II hardware instructions. + +2020-10-12 Iain Buclaw <ibuclaw@gdcproject.org> + + * testsuite/lib/libphobos.exp: Define tool_timeout, set to 600. + 2020-09-10 Iain Buclaw <ibuclaw@gdcproject.org> PR d/95680 diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index bcde105..485f8e9 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -d05ebaad15fbffce6d707c138c84d7b60fcf5ffd +58560d5163381b0f1c893bd0d035b7a0a1631f92 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/config/mips/switchcontext.S b/libphobos/libdruntime/config/mips/switchcontext.S index b08d9cc..2e0bd86 100644 --- a/libphobos/libdruntime/config/mips/switchcontext.S +++ b/libphobos/libdruntime/config/mips/switchcontext.S @@ -47,12 +47,12 @@ fiber_switchContext: #ifdef __mips_hard_float #define ALIGN8(val) (val + (-val & 7)) #define BELOW (ALIGN8(6 * 8 + 4)) - sdc1 $f20, (0 * 8 - BELOW)($sp) - sdc1 $f22, (1 * 8 - BELOW)($sp) - sdc1 $f24, (2 * 8 - BELOW)($sp) - sdc1 $f26, (3 * 8 - BELOW)($sp) - sdc1 $f28, (4 * 8 - BELOW)($sp) - sdc1 $f30, (5 * 8 - BELOW)($sp) + s.d $f20, (0 * 8 - BELOW)($sp) + s.d $f22, (1 * 8 - BELOW)($sp) + s.d $f24, (2 * 8 - BELOW)($sp) + s.d $f26, (3 * 8 - BELOW)($sp) + s.d $f28, (4 * 8 - BELOW)($sp) + s.d $f30, (5 * 8 - BELOW)($sp) #endif sw $ra, -4($sp) @@ -72,12 +72,12 @@ fiber_switchContext: move $sp, $a1 #ifdef __mips_hard_float - ldc1 $f20, (0 * 8 - BELOW)($sp) - ldc1 $f22, (1 * 8 - BELOW)($sp) - ldc1 $f24, (2 * 8 - BELOW)($sp) - ldc1 $f26, (3 * 8 - BELOW)($sp) - ldc1 $f28, (4 * 8 - BELOW)($sp) - ldc1 $f30, (5 * 8 - BELOW)($sp) + l.d $f20, (0 * 8 - BELOW)($sp) + l.d $f22, (1 * 8 - BELOW)($sp) + l.d $f24, (2 * 8 - BELOW)($sp) + l.d $f26, (3 * 8 - BELOW)($sp) + l.d $f28, (4 * 8 - BELOW)($sp) + l.d $f30, (5 * 8 - BELOW)($sp) #endif lw $ra, -4($sp) diff --git a/libphobos/libdruntime/rt/critical_.d b/libphobos/libdruntime/rt/critical_.d index c2ef822..40030ad 100644 --- a/libphobos/libdruntime/rt/critical_.d +++ b/libphobos/libdruntime/rt/critical_.d @@ -31,12 +31,30 @@ extern (C) void _d_critical_term() extern (C) void _d_criticalenter(D_CRITICAL_SECTION* cs) { + assert(cs !is null); ensureMutex(cast(shared(D_CRITICAL_SECTION*)) cs); lockMutex(&cs.mtx); } +extern (C) void _d_criticalenter2(D_CRITICAL_SECTION** pcs) +{ + if (atomicLoad!(MemoryOrder.acq)(*cast(shared) pcs) is null) + { + lockMutex(cast(Mutex*)&gcs.mtx); + if (atomicLoad!(MemoryOrder.raw)(*cast(shared) pcs) is null) + { + auto cs = new shared D_CRITICAL_SECTION; + initMutex(cast(Mutex*)&cs.mtx); + atomicStore!(MemoryOrder.rel)(*cast(shared) pcs, cs); + } + unlockMutex(cast(Mutex*)&gcs.mtx); + } + lockMutex(&(*pcs).mtx); +} + extern (C) void _d_criticalexit(D_CRITICAL_SECTION* cs) { + assert(cs !is null); unlockMutex(&cs.mtx); } |