Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IonMonkey PPC backend #178

Closed
GoogleCodeExporter opened this issue Aug 9, 2015 · 88 comments
Closed

IonMonkey PPC backend #178

GoogleCodeExporter opened this issue Aug 9, 2015 · 88 comments

Comments

@GoogleCodeExporter
Copy link
Contributor

from dvander to m.dev.tech.js-engine today,

IonMonkey has now landed on mozilla-central (yay!). Largely this shouldn't 
affect anyone doing SpiderMonkey development, but in case it does, here are the 
big takeaway changes:

(0) Benchmarks (usually) get faster. Compiling the shell does not. Sorry :(

(1) By running the shell, the flags "--ion -m -n" are now implied by default. 
You can disable them respectively with "--no-ion", "--no-jm", and "--no-ti". 
Disabling TI disables IonMonkey.

In the browser, there is one new JS pref: "javascript.options.ion.content". We 
don't expose any other flags since they'd only exist to horribly break stuff.

(2) IonMonkey, unlike JM, does not use the interpreter stack to store local 
variables and frames. It uses the C stack. This means that cx->fp(), 
js_GetTopStackFrame(), etc, must not be used unless with great care. Even if 
you have a js::StackFrame, it is not okay to peek at it because it could be 
stale.

When in doubt, use the wonderful ScriptFrameIter class. It has abstractions for 
walking the stack and inspecting frames so you don't ever have to touch a 
js::StackFrame.

(3) Lastly, IonMonkey introduces new ways to get in and out of the JIT. 
Briefly, they are:

  (a) At function calls or loop edges, we may decide to run a script with IonMonkey. From C++, this goes through ion::Cannon.

  (b) A guard failure, type-inference invalidation, or GC can cause a "bailout". A bailout is when an Ion frame on the stack must be converted back into an interpreter frame. When this happens, interpreter frames are created for each JS frame in the Ion frame (there can be multiple because of inlining), and we resume running the function in the interpreter instead.

-David 

The stack frame stuff could be ... very interesting given our past 
misadventures with stack. For Judgment Day, we will simply disable it, but we 
should start working on it.

Original issue reported on code.google.com by [email protected] on 11 Sep 2012 at 8:32

@GoogleCodeExporter
Copy link
Contributor Author

http://hg.mozilla.org/mozilla-central/file/fdfaef738a00/js/src/configure.in 
implies that sparc has ENABLE_ION=0, so that should work for us also. We should 
wait to see if there is a SPARC version because we can pattern ourselves upon 
that.

Original comment by [email protected] on 11 Sep 2012 at 8:39

@GoogleCodeExporter
Copy link
Contributor Author

Full JM ABI compliance will be needed, and probably is needed due to some 
glitchiness in 17 anyway.

Original comment by [email protected] on 18 Sep 2012 at 2:16

@GoogleCodeExporter
Copy link
Contributor Author

Original comment by [email protected] on 19 Dec 2012 at 10:35

@GoogleCodeExporter
Copy link
Contributor Author

Issue 150 has been merged into this issue.

Original comment by [email protected] on 19 Dec 2012 at 10:37

@GoogleCodeExporter
Copy link
Contributor Author

Original comment by [email protected] on 19 Dec 2012 at 11:15

@GoogleCodeExporter
Copy link
Contributor Author

Started work on this today. We will be the first big-endian port, it looks 
like. Converted about half the files for about 10% of the code base. I am 
patterning us after ARM.

Things I've noticed already: Ion allows us to get all 32 GPRs *and* FPRs in 
play. Jumps use a jump table.

Original comment by [email protected] on 14 Jan 2013 at 5:11

@GoogleCodeExporter
Copy link
Contributor Author

A lot of the LIR/MIR stuff is totally bonkers. I don't have enough experience 
with intermediate representations to make much sense of it, but then neither 
did the author of the ARM port (actual comment: "oh god, what is this code?").

Original comment by [email protected] on 15 Jan 2013 at 3:48

@GoogleCodeExporter
Copy link
Contributor Author

IonFrames-ppc.h tonight. I'm suspecting that the stack is not ABI compliant 
during run until it has to make a call, but I haven't fully done the ARM 
comparison against the ARM stack during a JaegerMonkey run.

Original comment by [email protected] on 18 Jan 2013 at 3:15

@GoogleCodeExporter
Copy link
Contributor Author

After a couple days of staring at it, I think I get IonFrames. It's taking 
IonCommonFrameLayout, which should have our linkage area and arguments (wink to 
Ben), then adding a frame descriptor. All the other stack frame layouts are 
overlaid on it and add additional data fields to the stack.

What I still need to figure out is how registers get spilled (right now they 
seem to spill to a "spill area" in the stack, but this doesn't seem ABI 
compliant) and how control is transferred.

Original comment by [email protected] on 23 Jan 2013 at 4:33

@GoogleCodeExporter
Copy link
Contributor Author

dvander replied to my query.

There is a common frame header, which consists of a return address and a
caller-pushed fake-o frame pointer (contains outgoing type and
framesize). After that each of the frames is quite different.

  OptimizedJS - pushed when calling into a JavaScript function
  Entry - pushed as part of EnterIon(), just acts as a delimiter
  Rectifier - pushed in between two OptimizedJS frames when the argument
              count doesn't match
  Bailed_JS - an OptimizedJS frame that has been bailed out
  Bailed_Rectifier - Rectifier frame that has been bailed out
      (these two are never pushed, the frametype bits are just modified.
       they can only exist as the most recent frame.)
  Exit - pushed when an OptimizedJS frame wants to call into C++
  Osr - unused, you can ignore it

Sample frame stacks might look like this from oldest to newest:
   [Entry, OptimizedJS, OptimizedJS, OptimizedJS, Exit]
   [Entry, OptimizedJS, Rectifier, OptimizedJS, Rectifier, OptimizedJS]
   [Entry, OptimizedJS, Bailed_JS]

Unfortunately I don't think the state is documented well, and it's got
lots of corners. It's also scattered across Ion*FrameLayout,
Bailouts.cpp, and IonFrames.cpp. The good news is that these days, the
majority of the frame code is identical across x86/x64/ARM, so PPC might
just fit in too.

Original comment by [email protected] on 31 Jan 2013 at 3:42

@GoogleCodeExporter
Copy link
Contributor Author

and npierron,

Hi Cameron,

On 01/30/2013 01:38 PM, David Anderson wrote:
 > The baseline compiler folks have been deep in this area lately too.
 >
 > There is a common frame header, which consists of a return address and a
 > caller-pushed fake-o frame pointer (contains outgoing type and
 > framesize). After that each of the frames is quite different.

This shared stack representation is used to store the return address and a 
descriptor.  All calls into/from Ion should register these fields, except a 
few callWithABI which side-effect free (GC-free).

The return address, in addition to "frequently" (see fake-exit frames 
detailed below) contain the back link, is used for indexing safepoints and 
snapshots which are respectively used for marking objects which are on the 
stack (see saveLive functions) and for recovering slots of inspected frames 
which is necessary for fun.arguments and for iterating inline frames.

The descriptor is a packed value which is computed statically except for 
fun.apply calls where we copy the arguments (see visitApplyArgsGeneric) and 
for the rectifier frame (see generateArgumentsRectifier).  It contains the 
type of the opened frame, and the number of bytes between the bottom of the 
opened frame and the top of the parent frame (see IonFrameIterator::prevFp).

We have different kind of frames:

 >    Entry - pushed as part of EnterIon(), just acts as a delimiter

The entry frame is pushed by one of the Trampoline function (see 
generateEnterJIT), and it marks the beginning of an Ion activation, and the 
end of the stack iteration for IonFrameIterator.

This frame is a JS Frame, as it need to push all actual arguments (the 
effective given by the caller) and the strict minimum expected by the callee 
(the formal arguments).  Then after pushing all arguments, we push the 
number of actual argument (might be less than the number of copied 
arguments, in case of underflow), followed by the CalleeToken.  The 
CalleeToken is either a JSScript pointer (if the low bit is 1), or a 
JSFunction pointer (if the low bit it 0).  Then this is the usual decriptor 
& return address.

 >    OptimizedJS - pushed when calling into a JavaScript function

This kind of frame is pushed for Ion-compiled functions.  The call is 
composed of actual arguments, the number of actual arguments, the callee 
token, the descriptor and the return address.

 >    Rectifier - pushed in between two OptimizedJS frames when the argument
 >                count doesn't match

If during the call we detect that the JSFunction expect more arguments 
(underflow of argument), then we are calling into generateArgumentsRectifier 
(setting the descriptor accordingly).  The rectifier pushes the missing 
formal arguments (set to UndefinedValue), followed by the actual arguments, 
followed the number of actual arguments, followed by the same calleeToken, a 
descriptor describing the recitfier frame size, and the return address into 
the rectifier.

 >    Exit - pushed when an OptimizedJS frame wants to call into C++

An exit frame is used to mark he point where we exit an Ion activation.  The 
minimum required is a descriptor and a return address.  Then depending on 
the kind of the exit frame we may expect different kind of arguments.  To 
identify the variety of exit frames, we use a footer which is used when 
marking arguments (see MarkIonExitFrame).

All exit frames have to set the thread-local ionTop of the runtime.  This 
variable is used to start iterating the stack when StackIter or when the GC 
needs it.  This is abstract under linkExitFrame.

We can distinguish 2 categories of exit frames, normal exit frames (callVM, 
see generateVMWrapper) and fake exit frames.  Normal exit frames are using a 
call to a VM wrapper to fill the footer and to link the exit frame.  Fake 
exit frame are inlined into the generated code (for DOM calls, and for 
functions called from Inline Caches) and they are using a fake return 
address which only serve as an index to find the safepoints and snapshots.

 >    Bailed_JS - an OptimizedJS frame that has been bailed out
 >    Bailed_Rectifier - Rectifier frame that has been bailed out
 >        (these two are never pushed, the frametype bits are just modified.
 >         they can only exist as the most recent frame.)

In case of bailout, we have to unwind the last frame.  The last frame then 
appear as an exit frame, as the size of an exit frame is different than the 
size of a OptimizedJS frame / Recitifer frame, we set the this Bailed_* 
variant to avoid resizing the frame in-place (see EnsureExitFrame).

 >    Osr - unused, you can ignore it
 >
 > Sample frame stacks might look like this from oldest to newest:
 >     [Entry, OptimizedJS, OptimizedJS, OptimizedJS, Exit]
 >     [Entry, OptimizedJS, Rectifier, OptimizedJS, Rectifier, OptimizedJS]
 >     [Entry, OptimizedJS, Bailed_JS]
 >
 > Unfortunately I don't think the state is documented well, and it's got
 > lots of corners. It's also scattered across Ion*FrameLayout,
 > Bailouts.cpp, and IonFrames.cpp. The good news is that these days, the
 > majority of the frame code is identical across x86/x64/ARM, so PPC might
 > just fit in too.

I guess you can follow what Marty did for ARM, as you are also sharing a 
link register.  Still this might be a bit more tricky if you cannot do thje 
same trick as ARM for pushing the pc ahead of the call, in which case you 
might have to store it after branching to the generate VM wrapper.
[...]
Don't hesitate to come back to us if you have any trouble ;)
I will update the documentation tomorrow with what I mentioned in this email.

https://wiki.mozilla.org/IonMonkey/Frames


Original comment by [email protected] on 31 Jan 2013 at 3:45

@GoogleCodeExporter
Copy link
Contributor Author

https://bugzilla.mozilla.org/show_bug.cgi?id=764876 shows our timeframe is 
getting awful short.

Original comment by [email protected] on 21 Mar 2013 at 12:35

@GoogleCodeExporter
Copy link
Contributor Author

Original comment by [email protected] on 13 Apr 2013 at 12:18

@GoogleCodeExporter
Copy link
Contributor Author

Assembler and macro assembler are complete enough to try to get this to compile.

Original comment by [email protected] on 25 Apr 2013 at 5:10

@GoogleCodeExporter
Copy link
Contributor Author

Assembler parses. Macro assembler parses, too, but seems to be missing a lot.

Original comment by [email protected] on 29 Apr 2013 at 4:55

@GoogleCodeExporter
Copy link
Contributor Author

MacroAssembler now compiles. Lots of unhappy build warnings I need to sort out 
before I can call stage 2 completed.

Original comment by [email protected] on 30 Apr 2013 at 2:14

@GoogleCodeExporter
Copy link
Contributor Author

Scary:

/Volumes/BruceDeuce/src/mozilla-21b/js/src/methodjit/PolyIC.h:403:27: warning: 
'js::mjit::ic::PICInfo::shapeReg' is too small to hold all values of 
'js::mjit::MacroAssemblerTypedefs::RegisterID {aka enum 
JSC::PPCRegisters::RegisterID}' [enabled by default]
/Volumes/BruceDeuce/src/mozilla-21b/js/src/methodjit/PolyIC.h:404:27: warning: 
'js::mjit::ic::PICInfo::objReg' is too small to hold all values of 
'js::mjit::MacroAssemblerTypedefs::RegisterID {aka enum 
JSC::PPCRegisters::RegisterID}' [enabled by default]

Original comment by [email protected] on 30 Apr 2013 at 2:25

@GoogleCodeExporter
Copy link
Contributor Author

The only way to deal with those warnings may be to not use a few registers,
unfortunately.

From methodjit/PolyIC.h:

struct PICInfo {
[...]
  RegisterID shapeReg : 5;        // also the out type reg
  RegisterID objReg   : 5;        // also the out data reg
};

as well as typeReg inside the union. Apparently it Has Been Decided that 32
registers are Enough For Anyone. The bit-packing looks to have been
carefully designed, so at least for now I would recommend just abandoning a
few GPRs. But these compiler warnings certainly can't be ignored, since
they will lead to horrible mis-JITing if the bitfields overflow.

FYI: I no longer have a functioning PPC machine, since my old G4 Powerbook
finally gave up last fall. I'm still keeping an eye on 10.4Fx, but I can't
really contribute code anymore since I don't have a machine to compile or
test with.

Original comment by [email protected] on 7 May 2013 at 3:11

@GoogleCodeExporter
Copy link
Contributor Author

No worries. I appreciate your hard work on JM! It will still carry over into 
the new assembler.

In any case, I merely mention the warnings for amusement, since there will be 
no JM integration with Ion (I'm shooting for the Fx25 timeframe, and by then 
the baseline compiler will be well established).

Still working on the Lowering and MoveEmitter portions. MoveEmitter is going to 
need a lot of overhauling, since I wrote it originally with assumptions that no 
longer hold true for the current version of the MacroAssembler. I can see why 
there's no MIPS or SPARC port; this is really involved.

Original comment by [email protected] on 7 May 2013 at 4:08

@GoogleCodeExporter
Copy link
Contributor Author

JS now builds, but does not link yet. We still need

  "js::ion::CodeGeneratorPPC::visitDivI(js::ion::LDivI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitCompareD(js::ion::LCompareD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitUnbox(js::ion::LUnbox*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitMinMaxD(js::ion::LMinMaxD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitStoreSlotT(js::ion::LStoreSlotT*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::ToValue(js::ion::LInstruction*, unsigned long)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitAbsD(js::ion::LAbsD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitTruncateDToInt32(js::ion::LTruncateDToInt32*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitTestIAndBranch(js::ion::LTestIAndBranch*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitSqrtD(js::ion::LSqrtD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitOsrValue(js::ion::LOsrValue*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitShiftI(js::ion::LShiftI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::Assembler::TraceJumpRelocations(JSTracer*, js::ion::IonCode*, js::ion::CompactBufferReader&)", referenced from:
      js::ion::IonCode::trace(JSTracer*)   in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitTestDAndBranch(js::ion::LTestDAndBranch*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitSubI(js::ion::LSubI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitModPowTwoI(js::ion::LModPowTwoI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitBitNotI(js::ion::LBitNotI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitAddI(js::ion::LAddI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::ToOutValue(js::ion::LInstruction*)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitNotD(js::ion::LNotD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitModMaskI(js::ion::LModMaskI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::FrameSizeClass::FromDepth(unsigned int)", referenced from:
      js::ion::CodeGenerator::link()    in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitRound(js::ion::LRound*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::Assembler::trace(JSTracer*)", referenced from:
      JS::AutoGCRooter::trace(JSTracer*)     in libjs_static.a(RootMarking.o)
  "vtable for js::ion::CodeGeneratorPPC", referenced from:
      __data@0 in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitLoadElementT(js::ion::LLoadElementT*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitUrshD(js::ion::LUrshD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitImplicitThis(js::ion::LImplicitThis*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::generateEpilogue()", referenced from:
      js::ion::CodeGenerator::generate()    in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitNotI(js::ion::LNotI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::bailout(js::ion::LSnapshot*)", referenced from:
      js::ion::CodeGenerator::visitBoundsCheck(js::ion::LBoundsCheck*)  in libjs_static.a(CodeGenerator.o)
      js::ion::CodeGenerator::visitClampVToUint8(js::ion::LClampVToUint8*)  in libjs_static.a(CodeGenerator.o)
  "js::ion::Assembler::copyPreBarrierTable(unsigned char*)", referenced from:
      js::ion::IonCode::copyFrom(js::ion::MacroAssembler&) in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitGuardShape(js::ion::LGuardShape*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitBoxDouble(js::ion::LBoxDouble*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::AutoFlushCache::flushAnyway()", referenced from:  
[...]
  "js::ion::CodeGeneratorPPC::emitBranch(js::ion::Assembler::Condition, js::ion::MBasicBlock*, js::ion::MBasicBlock*)", referenced from:
  "js::ion::CodeGeneratorPPC::emitTableSwitchDispatch(js::ion::MTableSwitch*, js::ion::Register const&, js::ion::Register const&)", referenced from:
  "js::ion::CodeGeneratorPPC::visitMathD(js::ion::LMathD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::FrameSizeClass::frameSize() const", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitValue(js::ion::LValue*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitCompare(js::ion::LCompare*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::AutoFlushCache::~AutoFlushCache()", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitGuardClass(js::ion::LGuardClass*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitInterruptCheck(js::ion::LInterruptCheck*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitLoadSlotV(js::ion::LLoadSlotV*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::Assembler::processCodeLabels(js::ion::IonCode*)", referenced from:
      js::ion::IonCode::copyFrom(js::ion::MacroAssembler&) in libjs_static.a(Ion.o)
  "js::ion::Assembler::copyDataRelocationTable(unsigned char*)", referenced from:
      js::ion::IonCode::copyFrom(js::ion::MacroAssembler&) in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitBitOpI(js::ion::LBitOpI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitRecompileCheck(js::ion::LRecompileCheck*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::bailoutIf(js::ion::Assembler::Condition, js::ion::LSnapshot*)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitCompareAndBranch(js::ion::LCompareAndBranch*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::PatchJump(js::ion::CodeLocationJump, js::ion::CodeLocationLabel)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::bailoutFrom(js::ion::Label*, js::ion::LSnapshot*)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::generateInvalidateEpilogue()", referenced from:
      js::ion::CodeGenerator::generate()    in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitCompareDAndBranch(js::ion::LCompareDAndBranch*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::generatePrologue()", referenced from:
      js::ion::CodeGenerator::generate()    in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::storeElementTyped(js::ion::LAllocation const*, js::ion::MIRType, js::ion::MIRType, js::ion::Register const&, js::ion::LAllocation const*)", referenced from:
[...]
  "js::ion::CodeGeneratorPPC::visitMulI(js::ion::LMulI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::FrameSizeClass::ClassLimit()", referenced from:
      js::ion::IonRuntime::initialize(JSContext*)     in libjs_static.a(Ion.o)
      js::ion::IonRuntime::initialize(JSContext*)     in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitModI(js::ion::LModI*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::Assembler::TraceDataRelocations(JSTracer*, js::ion::IonCode*, js::ion::CompactBufferReader&)", referenced from:
      js::ion::IonCode::trace(JSTracer*)   in libjs_static.a(Ion.o)
  "js::ion::CodeGeneratorPPC::visitDouble(js::ion::LDouble*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitBox(js::ion::LBox*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitLoadSlotT(js::ion::LLoadSlotT*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitCompareB(js::ion::LCompareB*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitMoveGroup(js::ion::LMoveGroup*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::CodeGeneratorPPC(js::ion::MIRGenerator*, js::ion::LIRGraph*)", referenced from:
      js::ion::CodeGenerator::CodeGenerator(js::ion::MIRGenerator*, js::ion::LIRGraph*) in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::generateOutOfLineCode()", referenced from:
      js::ion::CodeGenerator::generate()    in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitFloor(js::ion::LFloor*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitCompareBAndBranch(js::ion::LCompareBAndBranch*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)
  "js::ion::CodeGeneratorPPC::visitPowHalfD(js::ion::LPowHalfD*)", referenced from:
      vtable for js::ion::CodeGenerator in libjs_static.a(CodeGenerator.o)

I'll be lucky to have this done by next year. :(

Original comment by [email protected] on 15 May 2013 at 2:34

@GoogleCodeExporter
Copy link
Contributor Author

JaegerMonkey is dead, as are all bugs depending on it. We will implement 
BaselineCompiler first and hope it's good enough to get 24 bootstrapped.

Original comment by [email protected] on 17 May 2013 at 4:39

@GoogleCodeExporter
Copy link
Contributor Author

Almost there. Still left to define:

  "js::ion::CodeGeneratorPPC::emitBranch(js::ion::Assembler::DoubleCondition, js::ion::MBasicBlock*, js::ion::MBasicBlock*)", referenced from:
  "js::ion::Assembler::trace(JSTracer*)", referenced from:
  "js::AsmJSMachExceptionHandler::AsmJSMachExceptionHandler()", referenced from:
  "js::ion::AutoFlushCache::flushAnyway()", referenced from:
  "js::AsmJSMachExceptionHandler::release()", referenced from:
  "js::ion::AutoFlushCache::~AutoFlushCache()", referenced from:
  "js::AsmJSMachExceptionHandler::clearCurrentThread()", referenced from:

Original comment by [email protected] on 27 May 2013 at 4:45

@GoogleCodeExporter
Copy link
Contributor Author

LINKED SUCCESSFULLY

Original comment by [email protected] on 28 May 2013 at 1:44

@GoogleCodeExporter
Copy link
Contributor Author

Ben, if you're around, check me on how your G3/G4 trampolines are generated (I 
need to unwind them to get the branch target):

inline: lis ha(target)
inline: b/bc to trampoline
trampo: ori lo(target)
trampo: mtctr/b(c)ctr(l)

inline: b/bc directly to target

Original comment by [email protected] on 15 Jun 2013 at 10:52

@GoogleCodeExporter
Copy link
Contributor Author

Working from memory, the only addition is that in the direct branch case it's

inline: lis (offset to trampoline) // in case a future repatch needs the 
trampoline
inline: b/bc to target

after linking. 

Original comment by [email protected] on 16 Jun 2013 at 2:55

@GoogleCodeExporter
Copy link
Contributor Author

Ugh. How can I tell the difference?

Original comment by [email protected] on 16 Jun 2013 at 2:58

@GoogleCodeExporter
Copy link
Contributor Author

Maybe I'll just disable the G3/G4 trampolines while I debug this.

Anyway, 24 now finally builds after working around Mozilla's crap in bug 
881882, but doesn't link. We're still missing

Undefined symbols:
  "js::IsAsmJSModuleNative(int (*)(JSContext*, unsigned int, JS::Value*))", referenced from:
      JS_CloneFunctionObject(JSContext*, JSObject*, JSObject*) in libjs_static.a(jsapi.o)
      js::NewFunction(JSContext*, JS::Handle<JSObject*>, int (*)(JSContext*, unsigned int, JS::Value*), unsigned int, JSFunction::Flags, JS::Handle<JSObject*>, JS::Handle<JSAtom*>, js::gc::AllocKind, js::NewObjectKind) in libjs_static.a(jsfun.o)
      BindNameToSlotHelper(JSContext*, js::frontend::BytecodeEmitter*, js::frontend::ParseNode*) in libjs_static.a(BytecodeEmitter.o)
      EmitFunc(JSContext*, js::frontend::BytecodeEmitter*, js::frontend::ParseNode*) in libjs_static.a(BytecodeEmitter.o)
      JSScript::getFunction(unsigned long) in libjs_static.a(Interpreter.o)
      MaybeCheckEvalFreeVariables(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, js::frontend::Parser<js::frontend::FullParseHandler>&, js::frontend::ParseContext<js::frontend::FullParseHandler>&) in libjs_static.a(BytecodeCompiler.o)
      MaybeCheckEvalFreeVariables(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, js::frontend::Parser<js::frontend::FullParseHandler>&, js::frontend::ParseContext<js::frontend::FullParseHandler>&) in libjs_static.a(BytecodeCompiler.o)
      js::frontend::CompileScript(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSScript*>, JS::CompileOptions const&, unsigned short const*, unsigned long, JSString*, unsigned int, js::SourceCompressionToken*) in libjs_static.a(BytecodeCompiler.o)
      js::frontend::CompileScript(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSScript*>, JS::CompileOptions const&, unsigned short const*, unsigned long, JSString*, unsigned int, js::SourceCompressionToken*) in libjs_static.a(BytecodeCompiler.o)
      js::ion::BaselineCompiler::emit_JSOP_LAMBDA()     in libjs_static.a(BaselineCompiler.o)
      js::ion::BaselineCompiler::emit_JSOP_DEFFUN()     in libjs_static.a(BaselineCompiler.o)
      js::ion::IonBuilder::jsop_lambda(JSFunction*)      in libjs_static.a(IonBuilder.o)
      js::ion::IonBuilder::jsop_deffun(unsigned int) in libjs_static.a(IonBuilder.o)
      js::ion::IonBuilder::jsop_deffun(unsigned int) in libjs_static.a(IonBuilder.o)
  "js::ion::BaselineCompilerARM::BaselineCompilerARM(JSContext*, JS::Handle<JSScript*>)", referenced from:
      js::ion::BaselineCompiler::BaselineCompiler(JSContext*, JS::Handle<JSScript*>) in libjs_static.a(BaselineCompiler.o)
  "js::CallAsmJS(JSContext*, unsigned int, JS::Value*)", referenced from:
      __data@0 in libjs_static.a(AsmJS.o)
  "js::LinkAsmJS(JSContext*, unsigned int, JS::Value*)", referenced from:
      __data@0 in libjs_static.a(AsmJS.o)
  "js::ion::ParallelGetPropertyIC::initializeAddCacheState(js::ion::LInstruction*, js::ion::AddCacheState*)", referenced from:
      vtable for js::ion::ParallelGetPropertyIC in libjs_static.a(IonCaches.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Original comment by [email protected] on 15 Jul 2013 at 12:22

@GoogleCodeExporter
Copy link
Contributor Author

Linked on 24. Now to get BaselineCompiler up.

Original comment by [email protected] on 15 Jul 2013 at 12:33

@GoogleCodeExporter
Copy link
Contributor Author

BaselineCompiler except for two edge cases works.

It's time to optimize.

Original comment by [email protected] on 11 Oct 2013 at 4:27

@GoogleCodeExporter
Copy link
Contributor Author

Back on IonPower. I'm just going to put things here I need to come back to.

failing test:
function ok(a){print(a.length);}ok("WTF");ok("WTF");

also fails:
a="WTF";function ok(){print(a.length);}ok();ok();

doesn't fail:
function ok(a){x=a.length;print(x);}ok("WTF");ok("WTF");

doesn't fail:
function ok(a){print(a.length);}ok("WTF");

currently solved by suppressing GetName(GlobalName) stub, but I don't see the 
bug, so I suspect this is just affected by wherever the badness still lurks:
[BaselineIC]   Generating GetName(GlobalName) stub
[Codegen] == loadPtr(adr, reg) ==
[Codegen] ////////
[Codegen] 00000000 --- 81c70010 lwz r14,16(r7)
[Codegen] == branch32(cond, adr, reg, l) ==
[Codegen] 00000004 --- 80050000 lwz r0,0(r5)
[Codegen] 00000008 --- 7c007000 cmpw cr0,r0,r14
[Codegen] 0000000c --- 7fe00008 trap
[Codegen] -------- --- ffffffff <<< bc 0024 offset
[Codegen] 00000014 --- 60000000 nop
[Codegen] 00000018 --- 60000000 nop
[Codegen] 0000001c --- 40820004 bc 4,2,4
[Codegen] == loadPtr(adr, reg) ==
[Codegen] 00000020 --- 80a50008 lwz r5,8(r5)
[Codegen] == load32(adr, reg) ==
[Codegen] 00000024 --- 81c70014 lwz r14,20(r7)
[Codegen] == loadValue(bi, vo) ==
[Codegen] 00000028 --- 55c01838 slwi r0,r14,3
[Codegen] 0000002c --- 7d850214 add r12,r5,r0
[Codegen] == loadValue(adr, vo) ==
[Codegen] 00000030 --- 80ac0004 lwz r5,4(r12)
[Codegen] 00000034 --- 80cc0000 lwz r6,0(r12)
[Codegen] == [[ EmitEnterTypeMonitorIC ==
[Codegen] == loadPtr(adr, reg) ==
[Codegen] 00000038 --- 80e7000c lwz r7,12(r7)
[Codegen] == loadPtr(adr, reg) ==
[Codegen] 0000003c --- 80670000 lwz r3,0(r7)
[Codegen] 00000040 --- 7c6903a6 mtspr ctr,r3
[Codegen] 00000044 --- 4e800420 bctr
[Codegen] ==    EmitEnterTypeMonitorIC ]] ==
[Codegen] # ::bind evaluating 0000000c
[Codegen] # ::bind short jump 4 0000000c -> 00000048 offset 60
[Codegen] == [[ EmitStubGuardFailure ==
[Codegen] == loadPtr(adr, reg) ==
[Codegen] 00000048 --- 80670000 lwz r3,0(r7)
[Codegen] 0000004c --- 7c6903a6 mtspr ctr,r3
[Codegen] == loadPtr(adr, reg) ==
[Codegen] 00000050 --- 80e70004 lwz r7,4(r7)
[Codegen] 00000054 --- 4e800420 bctr
[Codegen] ==    EmitStubGuardFailure ]] ==

Original comment by [email protected] on 19 Feb 2015 at 5:16

@GoogleCodeExporter
Copy link
Contributor Author

Current failure list (makes it through test cycle without crashing or 
assertions though I suspect the debug failure may be an infinite loop instead 
of a very slow runtime):

    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAcc
ess.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testZOOB.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/baseline/bug940972
.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/array-length
-double.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug620532.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/hypot-approx.js 
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/testTypedArrayClamping.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/testTypedArrayUint32.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/testTypedArrays.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/ArrayLengthGetPropertyIC.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1000960.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug750588.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug909997.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug915301.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug925305.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/setelem-float32-typedarray-ic.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-1.js 
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-2.js 
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-3.js 
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/bug679666.js   
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/normalIntTypedArrays.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/testIfEqX.js   
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/testSetTypedFloatArray.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/testSetTypedIntArray.js
TIMEOUTS:
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/debug/Script-getLineOffsets-06.js

Original comment by [email protected] on 19 Mar 2015 at 3:35

@GoogleCodeExporter
Copy link
Contributor Author

Fixed by fixing array-length-double.js:
array-length-double.js
bug620532.js
ArrayLengthGetPropertyIC.js

Let's look at typed arrays now, starting with bug940972.js

Original comment by [email protected] on 21 Mar 2015 at 5:33

@GoogleCodeExporter
Copy link
Contributor Author

Fixed by fixing bug940972.js:
bug940972.js
hypot-approx.js
testTypedArrayClamping.js
testTypedArrayUint32.js
testTypedArrays.js
bug1000960.js
bug750588.js
bug851792.js
bug915301.js
bug925305.js
setelem-float32-typedarray-ic.js
typed-arrays-1.js
typed-arrays-2.js
typed-arrays-3.js
jaeger/bug679666.js
normalIntTypedArrays.js
testSetTypedFloatArray.js
testSetTypedIntArray.js

Still to go:
testIfEqX.js
Script-getLineOffsets-06.js

Verified expected to fail:
bug908915.js: never understood what this one tests anyway
ion/bug909997.js : requires Ion, we will pass eventually

Original comment by [email protected] on 21 Mar 2015 at 6:57

@GoogleCodeExporter
Copy link
Contributor Author

and asm.js/testHeapAccess.js because it assumes little endian memory access

ALL EXPECTED TESTS PASS

Next: feasibility test on Ion. We have to get bailouts to work.

Original comment by [email protected] on 21 Mar 2015 at 8:26

@GoogleCodeExporter
Copy link
Contributor Author

IonPower now completes the test suite without asserting or crashing with 
--ion-eager --ion-offthread-compile=off (the strictest settings). We have a lot 
of failures, which actually suggests a single cause.

FAILURES:
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testControlFlow.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testExpressions.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testFloat32.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAccess.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testResize.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug507180.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/destructuring-iterator.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/testBug504520Harder.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/testLoopWithUndefined2.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/debug/Debugger-findScripts-12.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/debug/Frame-eval-07.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/debug/Frame-live-01.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/debug/Script-sourceStart-03.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/for-of/strings.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1007213.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1062612.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1090424.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug679493.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug716504.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug736135-2.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug736135.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug760103.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug816786.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug870356.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug889186.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug909997.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/ceil.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/compareAll.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/getelem-hole.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/recover-arrays.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/testFloat32-correctness.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/testInArray.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-1.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/bug643805.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/mulNegZero.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/inline/mathRound.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/latin1/toLowerCase-toUpperCase.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/pic/watch1a.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/pic/watch2a.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/pic/watch3a.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/pic/watch3b.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-crypto-sha1.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-partial-sums.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/truthiness/strict-not-equal-undefined.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/v8-v5/check-deltablue.js

Original comment by [email protected] on 17 Apr 2015 at 3:45

@GoogleCodeExporter
Copy link
Contributor Author

First pass. Already much shorter.

FAILURES:
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testExpressions.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testFloat32.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAccess.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1007213.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1062612.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug679493.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug716504.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug760103.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug870356.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug909997.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/ceil.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/testFloat32-correctness.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-1.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/mulNegZero.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/inline/mathRound.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-partial-sums.js
    /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js

Original comment by [email protected] on 17 Apr 2015 at 5:05

@GoogleCodeExporter
Copy link
Contributor Author

Second pass. A little shorter.

FAILURES:
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testExpressions.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testFloat32.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAccess.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1007213.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1062612.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug760103.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug870356.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/ceil.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/test-scalar-replacement-float32.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/testFloat32-correctness.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/typed-arrays-1.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/inline/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/jaeger/inline/mathRound.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-partial-sums.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js

Original comment by [email protected] on 17 Apr 2015 at 10:11

@GoogleCodeExporter
Copy link
Contributor Author

Reworked rounding and single precision math. 11 failures to go.

    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testExpressions.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testFloat32.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAccess.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1007213.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug1062612.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug870356.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-partial-sums.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js

Original comment by [email protected] on 18 Apr 2015 at 5:58

@GoogleCodeExporter
Copy link
Contributor Author

(of which only 9 matter -- bug908915 and testHeapAccess are expected to fail)

Original comment by [email protected] on 18 Apr 2015 at 5:59

@GoogleCodeExporter
Copy link
Contributor Author

Fixed bad codegen with x_srwi/x_slwi.

    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/asm.js/testHeapAccess.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/basic/bug908915.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug851792.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug870356.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-partial-sums.js
    /Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager --ion-offthread-compile=off -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const platform='darwin'; const libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/'" -f /Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/sunspider/check-math-spectral-norm.js

Original comment by [email protected] on 19 Apr 2015 at 1:09

@GoogleCodeExporter
Copy link
Contributor Author

Down to one failing test case!

/Volumes/BruceDeuce/src/mozilla-36t/obj-ff-dbg/dist/bin/js --ion-eager 
--ion-offthread-compile=off -f 
/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/prolog.js --js-cache 
/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/.js-cache -e "const 
platform='darwin'; const 
libdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/lib/'; const 
scriptdir='/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/'" -f 
/Volumes/BruceDeuce/src/mozilla-36t/js/src/jit-test/tests/ion/bug774644.js

Original comment by [email protected] on 24 Apr 2015 at 3:33

@GoogleCodeExporter
Copy link
Contributor Author

ALL PASS!

Original comment by [email protected] on 24 Apr 2015 at 10:36

  • Changed state: Verified

@shawnl
Copy link

shawnl commented Dec 17, 2015

Any chance of this work going into mozilla-central to support Linux-ppc64le?

@classilla
Copy link
Owner

You're welcome to move the code over, but it won't be me that does it, since I don't have a Power8 or interest in that specific platform currently. If you wanted to do so, you would need to change the code that patches Ion for big-endianness (probably simply revert those changes), make sure the PPC backend was little-endian as well (we essentially assumed big-endian), finish the asm.js work which I abandoned for lack of utility, and change the trampoline for SysV ABI (OS X/ppc is PowerOpen, same as AIX). This is not trivial work, but you're welcome to try.

@shawnl
Copy link

shawnl commented Oct 19, 2017

but it won't be me that does it

Appears you changed your mind :)
http://tenfourfox.blogspot.com/2017/08/and-now-for-several-things-that-are.html

@awilfox
Copy link

awilfox commented Aug 26, 2018

I'm seriously hoping that a Linux PPC BE backend makes it, too, because some of us are running Taloses (and other post-G5 POWER hardware) in BE mode...

@yhaenggi
Copy link

That would even be good for G4/G5's running linux.

@classilla
Copy link
Owner

The JIT I'm planning to write unfortunately won't address either of those cases; it will be a 64-bit ("nunbox") little-endian JIT for POWER9, since that's how I run my own Talos. The folks working on a Chromium port are also running the JIT in LE.

It would still be possible to get a BE JIT working, but you'd still need to hack the core JIT to get around certain glitches with slot ordering (the 64-bit version may be better in this regard) and to get Wasm up you'll have to go whole hog and byteswap everything to and from typed arrays. TenFourFox only does this for integers since there are specific instructions that let us do that with no penalty. FPRs would have to be spilled and reordered. It would suck, but Wasm code tends to be inherently little-endian since most of it is being built on those platforms.

You could crib some of the patches from here (look for #ifdef JS_CPU_PPC_OSX and #ifdef JS_CODEGEN_PPC_OSX) but it would need to be adapted for what they're doing now.

@classilla
Copy link
Owner

I should add that it would be easier on Firefox than Chromium. Firefox at least assumes a lot less about the endianness of the machine, whereas I don't believe Chromium has ever run on a BE platform.

@awilfox
Copy link

awilfox commented Aug 27, 2018

At this point, the Web is crippled on PowerPC due to no JITs in any browser. I don't think I'd waste any time dealing with Wasm in a first-pass port (and, depending on adoption rates of Wasm, ever), when core browsing is suffering so badly.

Other than some papercut gfx bugs (#1339008 and #986328), Firefox runs correctly on PowerPC BE, both 32-bit and 64-bit. It's just dog slow because of a lack of JIT.

Thanks for the pointer towards what I'd need to look for here. I guess if you aren't going to focus there, I can get a head start next week.

@classilla
Copy link
Owner

By all means. I'm happy to advise if the changesets need explanation. You may need to go back into the old changeset packs to get the original diffs (IonMonkey became a thing in the 38.x timeframe).

One thing you probably also want to do is change it to properly use the link register rather than storing return addresses on top of the stack. This hurt alignment and fouled the LR cache but was the only way to solve certain problems at that time. Now you could just stick it in the generated prologue like any other compiled PPC function, which would be a definite speed improvement.

@darkbasic
Copy link

Hi, is there any news on the LE Power9 JIT?

@classilla classilla reopened this Nov 26, 2018
@classilla
Copy link
Owner

Whatever news is available is on talospace.com. This issue doesn't track its progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants