Skip to content

Commit dc849c8

Browse files
iangrunertConstellation
authored andcommitted
Enable FTL on Windows
https://bugs.webkit.org/show_bug.cgi?id=145366 Reviewed by Yusuke Suzuki. Disabling BBQ and OMG JIT for now, there's some edge cases which are currently broken. Fixes to testmasm, broken by previous sysv abi work. B3 float mod tests were broken on Windows due to differences between fmod(double, double) used within MathCommon fmodDouble, and the fmod(float, float) used within the tests. Using fmodl in the tests so they match behaviour with compiled B3. The countLeadingZero implementation for testClz* tests had an off-by-one error on Windows - using builtin __lzcnt64 and __lzcnt instead. Had to precommit stack memory for testCallFunctionWithHellaArguments3 to avoid accessing stack memory past the stack guard page. * Source/JavaScriptCore/assembler/ProbeContext.cpp: (JSC::Probe::flushDirtyStackPages): * Source/JavaScriptCore/assembler/ProbeContext.h: * Source/JavaScriptCore/assembler/testmasm.cpp: (JSC::invoke): (JSC::testStoreBaseIndex): * Source/JavaScriptCore/b3/B3LowerToAir.cpp: * Source/JavaScriptCore/b3/B3Validate.cpp: * Source/JavaScriptCore/b3/air/opcode_generator.rb: * Source/JavaScriptCore/b3/air/testair.cpp: * Source/JavaScriptCore/b3/testb3.h: (invoke): * Source/JavaScriptCore/b3/testb3_2.cpp: (testModArgFloat): (testModArgsFloat): (testModArgImmFloat): (testModImmArgFloat): (testModImmsFloat): * Source/JavaScriptCore/b3/testb3_3.cpp: (countLeadingZero): * Source/JavaScriptCore/b3/testb3_4.cpp: (testLoadFromFramePointer): * Source/JavaScriptCore/b3/testb3_5.cpp: (preCommitStackMemory): (testCallFunctionWithHellaArguments3): * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * Source/JavaScriptCore/jit/RegisterSet.cpp: (JSC::RegisterSetBuilder::ftlCalleeSaveRegisters): * Source/JavaScriptCore/llint/LowLevelInterpreter.asm: * Source/JavaScriptCore/runtime/Options.cpp: (JSC::Options::notifyOptionsChanged): * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJITImpl::RegisterBinding::none): * Source/JavaScriptCore/wasm/WasmBBQJIT.h: * Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp: (JSC::Wasm::BBQJITImpl::BBQJIT::addSIMDV_V): * Source/JavaScriptCore/wasm/WasmIRGeneratorHelpers.h: (JSC::Wasm::buildEntryBufferForCatchSIMD): (JSC::Wasm::buildEntryBufferForCatchNoSIMD): * Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp: * Source/cmake/OptionsJSCOnly.cmake: * Source/cmake/OptionsWin.cmake: Canonical link: https://commits.webkit.org/280777@main
1 parent 6f5b850 commit dc849c8

23 files changed

Lines changed: 188 additions & 46 deletions

Source/JavaScriptCore/assembler/ProbeContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
namespace JSC {
3434
namespace Probe {
3535

36-
static void flushDirtyStackPages(State*);
36+
static void SYSV_ABI flushDirtyStackPages(State*);
3737

3838
WTF_MAKE_TZONE_ALLOCATED_IMPL(Context);
3939

@@ -65,7 +65,7 @@ void executeJSCJITProbe(State* state)
6565
}
6666
}
6767

68-
static void flushDirtyStackPages(State* state)
68+
static void SYSV_ABI flushDirtyStackPages(State* state)
6969
{
7070
std::unique_ptr<Stack> stack(reinterpret_cast<Probe::Stack*>(state->initializeStackArg));
7171
stack->flushWrites();

Source/JavaScriptCore/assembler/ProbeContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ T CPUState::sp() const
196196
}
197197

198198
struct State;
199-
typedef void (*StackInitializationFunction)(State*);
199+
typedef void (SYSV_ABI *StackInitializationFunction)(State*);
200200

201201
#if CPU(ARM64E)
202202
#define PROBE_FUNCTION_PTRAUTH __ptrauth(ptrauth_key_process_dependent_code, 0, JITProbePtrTag)

Source/JavaScriptCore/assembler/testmasm.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ template<typename T, typename... Arguments>
269269
T invoke(const MacroAssemblerCodeRef<JSEntryPtrTag>& code, Arguments... arguments)
270270
{
271271
void* executableAddress = untagCFunctionPtr<JSEntryPtrTag>(code.code().taggedPtr());
272-
T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(executableAddress);
272+
T (SYSV_ABI *function)(Arguments...) = bitwise_cast<T(SYSV_ABI *)(Arguments...)>(executableAddress);
273273

274274
#if CPU(RISCV64)
275275
// RV64 calling convention requires all 32-bit values to be sign-extended into the whole register.
@@ -5713,11 +5713,7 @@ void testStoreBaseIndex()
57135713
{
57145714
auto test = compile([=](CCallHelpers& jit) {
57155715
emitFunctionPrologue(jit);
5716-
#if OS(WINDOWS)
5717-
constexpr FPRReg inputFPR = FPRInfo::argumentFPR2;
5718-
#else
57195716
constexpr FPRReg inputFPR = FPRInfo::argumentFPR0;
5720-
#endif
57215717
jit.storeDouble(inputFPR, CCallHelpers::BaseIndex(GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, CCallHelpers::TimesEight, -8));
57225718
emitFunctionEpilogue(jit);
57235719
jit.ret();
@@ -5729,11 +5725,7 @@ void testStoreBaseIndex()
57295725
{
57305726
auto test = compile([=](CCallHelpers& jit) {
57315727
emitFunctionPrologue(jit);
5732-
#if OS(WINDOWS)
5733-
constexpr FPRReg inputFPR = FPRInfo::argumentFPR2;
5734-
#else
57355728
constexpr FPRReg inputFPR = FPRInfo::argumentFPR0;
5736-
#endif
57375729
jit.storeDouble(inputFPR, CCallHelpers::BaseIndex(GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, CCallHelpers::TimesEight, 8));
57385730
emitFunctionEpilogue(jit);
57395731
jit.ret();
@@ -5747,11 +5739,7 @@ void testStoreBaseIndex()
57475739
{
57485740
auto test = compile([=](CCallHelpers& jit) {
57495741
emitFunctionPrologue(jit);
5750-
#if OS(WINDOWS)
5751-
constexpr FPRReg inputFPR = FPRInfo::argumentFPR2;
5752-
#else
57535742
constexpr FPRReg inputFPR = FPRInfo::argumentFPR0;
5754-
#endif
57555743
jit.storeFloat(inputFPR, CCallHelpers::BaseIndex(GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, CCallHelpers::TimesFour, -4));
57565744
emitFunctionEpilogue(jit);
57575745
jit.ret();
@@ -5763,11 +5751,7 @@ void testStoreBaseIndex()
57635751
{
57645752
auto test = compile([=](CCallHelpers& jit) {
57655753
emitFunctionPrologue(jit);
5766-
#if OS(WINDOWS)
5767-
constexpr FPRReg inputFPR = FPRInfo::argumentFPR2;
5768-
#else
57695754
constexpr FPRReg inputFPR = FPRInfo::argumentFPR0;
5770-
#endif
57715755
jit.storeFloat(inputFPR, CCallHelpers::BaseIndex(GPRInfo::argumentGPR0, GPRInfo::argumentGPR1, CCallHelpers::TimesFour, 4));
57725756
emitFunctionEpilogue(jit);
57735757
jit.ret();

Source/JavaScriptCore/b3/B3LowerToAir.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@
2727
#include "B3LowerToAir.h"
2828

2929
#if ENABLE(B3_JIT)
30+
31+
// On Windows, there's macros for these which interfere with the opcodes
32+
#pragma push_macro("RotateLeft32")
33+
#pragma push_macro("RotateLeft64")
34+
#pragma push_macro("RotateRight32")
35+
#pragma push_macro("RotateRight64")
36+
#pragma push_macro("StoreFence")
37+
#pragma push_macro("LoadFence")
38+
#pragma push_macro("MemoryFence")
39+
40+
#undef RotateLeft32
41+
#undef RotateLeft64
42+
#undef RotateRight32
43+
#undef RotateRight64
44+
#undef StoreFence
45+
#undef LoadFence
46+
#undef MemoryFence
47+
3048
#if USE(JSVALUE64)
3149
#include "AirBlockInsertionSet.h"
3250
#include "AirCCallSpecial.h"
@@ -5308,4 +5326,13 @@ IGNORE_RETURN_TYPE_WARNINGS_END
53085326
#endif
53095327

53105328
#endif // USE(JSVALUE64)
5329+
5330+
#pragma pop_macro("RotateLeft32")
5331+
#pragma pop_macro("RotateLeft64")
5332+
#pragma pop_macro("RotateRight32")
5333+
#pragma pop_macro("RotateRight64")
5334+
#pragma pop_macro("StoreFence")
5335+
#pragma pop_macro("LoadFence")
5336+
#pragma pop_macro("MemoryFence")
5337+
53115338
#endif // ENABLE(B3_JIT)

Source/JavaScriptCore/b3/B3Validate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,15 +468,15 @@ class Validater {
468468
case VectorExtractLane:
469469
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
470470
VALIDATE(value->numChildren() == 1, ("At ", *value));
471-
VALIDATE(value->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
471+
VALIDATE(value->type() == Wasm::toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
472472
VALIDATE(value->child(0)->type() == V128, ("At ", *value));
473473
break;
474474
case VectorReplaceLane:
475475
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
476476
VALIDATE(value->numChildren() == 2, ("At ", *value));
477477
VALIDATE(value->type() == V128, ("At ", *value));
478478
VALIDATE(value->child(0)->type() == V128, ("At ", *value));
479-
VALIDATE(value->child(1)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
479+
VALIDATE(value->child(1)->type() == Wasm::toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
480480
break;
481481
case VectorDupElement:
482482
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
@@ -498,7 +498,7 @@ class Validater {
498498
VALIDATE(!value->kind().hasExtraBits(), ("At ", *value));
499499
VALIDATE(value->numChildren() == 1, ("At ", *value));
500500
VALIDATE(value->type() == V128, ("At ", *value));
501-
VALIDATE(value->child(0)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
501+
VALIDATE(value->child(0)->type() == Wasm::toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value));
502502
break;
503503

504504
case VectorPopcnt:

Source/JavaScriptCore/b3/air/opcode_generator.rb

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,22 @@ def writeH(filename)
531531
writeH("Opcode") {
532532
| outp |
533533
outp.puts "#if ENABLE(B3_JIT)"
534+
535+
outp.puts "#pragma push_macro(\"RotateLeft32\")"
536+
outp.puts "#pragma push_macro(\"RotateLeft64\")"
537+
outp.puts "#pragma push_macro(\"RotateRight32\")"
538+
outp.puts "#pragma push_macro(\"RotateRight64\")"
539+
outp.puts "#pragma push_macro(\"StoreFence\")"
540+
outp.puts "#pragma push_macro(\"LoadFence\")"
541+
outp.puts "#pragma push_macro(\"MemoryFence\")"
542+
outp.puts "#undef RotateLeft32"
543+
outp.puts "#undef RotateLeft64"
544+
outp.puts "#undef RotateRight32"
545+
outp.puts "#undef RotateRight64"
546+
outp.puts "#undef StoreFence"
547+
outp.puts "#undef LoadFence"
548+
outp.puts "#undef MemoryFence"
549+
534550
outp.puts "namespace JSC { namespace B3 { namespace Air {"
535551
outp.puts "enum Opcode : int16_t {"
536552
$opcodes.keys.each {
@@ -546,6 +562,15 @@ def writeH(filename)
546562
outp.puts "class PrintStream;"
547563
outp.puts "JS_EXPORT_PRIVATE void printInternal(PrintStream&, JSC::B3::Air::Opcode);"
548564
outp.puts "} // namespace WTF"
565+
566+
outp.puts "#pragma pop_macro(\"RotateLeft32\")"
567+
outp.puts "#pragma pop_macro(\"RotateLeft64\")"
568+
outp.puts "#pragma pop_macro(\"RotateRight32\")"
569+
outp.puts "#pragma pop_macro(\"RotateRight64\")"
570+
outp.puts "#pragma pop_macro(\"StoreFence\")"
571+
outp.puts "#pragma pop_macro(\"LoadFence\")"
572+
outp.puts "#pragma pop_macro(\"MemoryFence\")"
573+
549574
outp.puts "#endif // ENABLE(B3_JIT)"
550575
}
551576

@@ -702,6 +727,22 @@ def endArchs(outp, archs)
702727
writeH("OpcodeUtils") {
703728
| outp |
704729
outp.puts "#if ENABLE(B3_JIT)"
730+
731+
outp.puts "#pragma push_macro(\"RotateLeft32\")"
732+
outp.puts "#pragma push_macro(\"RotateLeft64\")"
733+
outp.puts "#pragma push_macro(\"RotateRight32\")"
734+
outp.puts "#pragma push_macro(\"RotateRight64\")"
735+
outp.puts "#pragma push_macro(\"StoreFence\")"
736+
outp.puts "#pragma push_macro(\"LoadFence\")"
737+
outp.puts "#pragma push_macro(\"MemoryFence\")"
738+
outp.puts "#undef RotateLeft32"
739+
outp.puts "#undef RotateLeft64"
740+
outp.puts "#undef RotateRight32"
741+
outp.puts "#undef RotateRight64"
742+
outp.puts "#undef StoreFence"
743+
outp.puts "#undef LoadFence"
744+
outp.puts "#undef MemoryFence"
745+
705746
outp.puts "#include \"AirCustom.h\""
706747
outp.puts "#include \"AirInst.h\""
707748
outp.puts "#include \"AirFormTable.h\""
@@ -837,12 +878,37 @@ def endArchs(outp, archs)
837878
outp.puts "}"
838879

839880
outp.puts "} } } // namespace JSC::B3::Air"
881+
882+
outp.puts "#pragma pop_macro(\"RotateLeft32\")"
883+
outp.puts "#pragma pop_macro(\"RotateLeft64\")"
884+
outp.puts "#pragma pop_macro(\"RotateRight32\")"
885+
outp.puts "#pragma pop_macro(\"RotateRight64\")"
886+
outp.puts "#pragma pop_macro(\"StoreFence\")"
887+
outp.puts "#pragma pop_macro(\"LoadFence\")"
888+
outp.puts "#pragma pop_macro(\"MemoryFence\")"
889+
840890
outp.puts "#endif // ENABLE(B3_JIT)"
841891
}
842892

843893
writeH("OpcodeGenerated") {
844894
| outp |
845895
outp.puts "#if ENABLE(B3_JIT)"
896+
897+
outp.puts "#pragma push_macro(\"RotateLeft32\")"
898+
outp.puts "#pragma push_macro(\"RotateLeft64\")"
899+
outp.puts "#pragma push_macro(\"RotateRight32\")"
900+
outp.puts "#pragma push_macro(\"RotateRight64\")"
901+
outp.puts "#pragma push_macro(\"StoreFence\")"
902+
outp.puts "#pragma push_macro(\"LoadFence\")"
903+
outp.puts "#pragma push_macro(\"MemoryFence\")"
904+
outp.puts "#undef RotateLeft32"
905+
outp.puts "#undef RotateLeft64"
906+
outp.puts "#undef RotateRight32"
907+
outp.puts "#undef RotateRight64"
908+
outp.puts "#undef StoreFence"
909+
outp.puts "#undef LoadFence"
910+
outp.puts "#undef MemoryFence"
911+
846912
outp.puts "#include \"AirInstInlines.h\""
847913
outp.puts "#include \"B3ProcedureInlines.h\""
848914
outp.puts "#include \"CCallHelpers.h\""
@@ -1302,6 +1368,15 @@ def endArchs(outp, archs)
13021368
outp.puts "}"
13031369

13041370
outp.puts "} } } // namespace JSC::B3::Air"
1371+
1372+
outp.puts "#pragma pop_macro(\"RotateLeft32\")"
1373+
outp.puts "#pragma pop_macro(\"RotateLeft64\")"
1374+
outp.puts "#pragma pop_macro(\"RotateRight32\")"
1375+
outp.puts "#pragma pop_macro(\"RotateRight64\")"
1376+
outp.puts "#pragma pop_macro(\"StoreFence\")"
1377+
outp.puts "#pragma pop_macro(\"LoadFence\")"
1378+
outp.puts "#pragma pop_macro(\"MemoryFence\")"
1379+
13051380
outp.puts "#endif // ENABLE(B3_JIT)"
13061381
}
13071382

Source/JavaScriptCore/b3/air/testair.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ template<typename T, typename... Arguments>
104104
T invoke(const Compilation& code, Arguments... arguments)
105105
{
106106
void* executableAddress;
107-
T (*function)(Arguments...);
107+
T (SYSV_ABI *function)(Arguments...);
108108
T result;
109109

110110
executableAddress = untagCFunctionPtr<JITCompilationPtrTag>(code.code().taggedPtr());
111-
function = bitwise_cast<T(*)(Arguments...)>(executableAddress);
111+
function = bitwise_cast<T(SYSV_ABI *)(Arguments...)>(executableAddress);
112112
result = function(arguments...);
113113

114114
return result;

Source/JavaScriptCore/b3/testb3.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ template<typename T, typename... Arguments>
204204
T invoke(CodePtr<JITCompilationPtrTag> ptr, Arguments... arguments)
205205
{
206206
void* executableAddress = untagCFunctionPtr<JITCompilationPtrTag>(ptr.taggedPtr());
207-
T (*function)(Arguments...) = bitwise_cast<T(*)(Arguments...)>(executableAddress);
207+
T (SYSV_ABI *function)(Arguments...) = bitwise_cast<T(SYSV_ABI *)(Arguments...)>(executableAddress);
208208
return function(arguments...);
209209
}
210210

@@ -285,6 +285,10 @@ typedef B3Operand<int8_t> Int8Operand;
285285

286286
#define MAKE_OPERAND(value) B3Operand<decltype(value)> { #value, value }
287287

288+
#ifndef M_PI
289+
#define M_PI 3.14159265358979323846264338327950288
290+
#endif
291+
288292
template<typename FloatType>
289293
void populateWithInterestingValues(Vector<B3Operand<FloatType>>& operands)
290294
{
@@ -570,7 +574,7 @@ void testPatchpointDoubleRegs();
570574
void testSpillDefSmallerThanUse();
571575
void testSpillUseLargerThanDef();
572576
void testLateRegister();
573-
extern "C" void interpreterPrint(Vector<intptr_t>* stream, intptr_t value);
577+
extern "C" void SYSV_ABI interpreterPrint(Vector<intptr_t>* stream, intptr_t value);
574578
void testInterpreter();
575579
void testReduceStrengthCheckBottomUseInAnotherBlock();
576580
void testResetReachabilityDanglingReference();

Source/JavaScriptCore/b3/testb3_2.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ void testModArgFloat(float a)
23172317
root->appendNewControlValue(proc, Return, Origin(), result32);
23182318

23192319

2320-
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a)), bitwise_cast<int32_t>(static_cast<float>(fmod(a, a)))));
2320+
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a)), bitwise_cast<int32_t>(static_cast<float>(fmodl(a, a)))));
23212321
}
23222322

23232323
void testModArgsFloat(float a, float b)
@@ -2334,7 +2334,7 @@ void testModArgsFloat(float a, float b)
23342334
Value* result32 = root->appendNew<Value>(proc, BitwiseCast, Origin(), result);
23352335
root->appendNewControlValue(proc, Return, Origin(), result32);
23362336

2337-
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a), bitwise_cast<int32_t>(b)), bitwise_cast<int32_t>(static_cast<float>(fmod(a, b)))));
2337+
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a), bitwise_cast<int32_t>(b)), bitwise_cast<int32_t>(static_cast<float>(fmodl(a, b)))));
23382338
}
23392339

23402340
void testModArgImmFloat(float a, float b)
@@ -2349,7 +2349,7 @@ void testModArgImmFloat(float a, float b)
23492349
Value* result32 = root->appendNew<Value>(proc, BitwiseCast, Origin(), result);
23502350
root->appendNewControlValue(proc, Return, Origin(), result32);
23512351

2352-
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a)), bitwise_cast<int32_t>(static_cast<float>(fmod(a, b)))));
2352+
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(a)), bitwise_cast<int32_t>(static_cast<float>(fmodl(a, b)))));
23532353
}
23542354

23552355
void testModImmArgFloat(float a, float b)
@@ -2364,7 +2364,7 @@ void testModImmArgFloat(float a, float b)
23642364
Value* result32 = root->appendNew<Value>(proc, BitwiseCast, Origin(), result);
23652365
root->appendNewControlValue(proc, Return, Origin(), result32);
23662366

2367-
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(b)), bitwise_cast<int32_t>(static_cast<float>(fmod(a, b)))));
2367+
CHECK(isIdentical(compileAndRun<int32_t>(proc, bitwise_cast<int32_t>(b)), bitwise_cast<int32_t>(static_cast<float>(fmodl(a, b)))));
23682368
}
23692369

23702370
void testModImmsFloat(float a, float b)
@@ -2377,7 +2377,7 @@ void testModImmsFloat(float a, float b)
23772377
Value* result32 = root->appendNew<Value>(proc, BitwiseCast, Origin(), result);
23782378
root->appendNewControlValue(proc, Return, Origin(), result32);
23792379

2380-
CHECK(isIdentical(compileAndRun<int32_t>(proc), bitwise_cast<int32_t>(static_cast<float>(fmod(a, b)))));
2380+
CHECK(isIdentical(compileAndRun<int32_t>(proc), bitwise_cast<int32_t>(static_cast<float>(fmodl(a, b)))));
23812381
}
23822382

23832383
void testDivArgFloatWithUselessDoubleConversion(float a)

Source/JavaScriptCore/b3/testb3_3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ static unsigned countLeadingZero(IntegerType value)
16761676
return bitCount;
16771677

16781678
unsigned counter = 0;
1679-
while (!(static_cast<uint64_t>(value) & (1l << (bitCount - 1)))) {
1679+
while (!(static_cast<uint64_t>(value) & (1ull << (bitCount - 1)))) {
16801680
value <<= 1;
16811681
++counter;
16821682
}

0 commit comments

Comments
 (0)