aboutsummaryrefslogtreecommitdiffstats
path: root/qv4isel_masm.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify function call generation (part 2)Simon Hausmann2012-10-171-1/+1
| | | | | | | | | | | | | | Hide the mapping from function argument to register in a small section of the architecture specific code at the top of the instruction selector and use a generic ArgumentLoader helper class to first try loading function parameters in registers and then fall back to the stack. This is only tested on amd64 right now where we don't end up using the stack right now, so it will need testing/tweaking for ia32/arm. Change-Id: If073cd92a674e90dc28f2c9bdf2841bb07c020f1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify some builtin methodsLars Knoll2012-10-171-10/+17
| | | | | Change-Id: I2c524b3634c65e7cc0ee72a21937048c4e3ae10a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename generateFunctionCall2 and loadArgument1.Simon Hausmann2012-10-171-25/+25
| | | | | | | The old functions that implement the old calling convention are unused now. Change-Id: I8a6ba76c0ba2442f48a0dc331196ef399a902da0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Directly store constants as immediate Value'sLars Knoll2012-10-171-6/+12
| | | | | | | | | | | This removes a link from the JIT code to the IR, and should improve performance as we need slightly less copies. On 64 bit, Values are stores in 2 instructions instead of 4 now. Change-Id: I4a90165fcdfc2d77ac3f6e7e9accdef8600fadd6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixed more calling conventionsLars Knoll2012-10-171-4/+4
| | | | | | | Implemented a few stubs for qmljs_inplace_op_member Change-Id: I542a535862339285db7ec0b547754453545a3dc0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix order of argumentsLars Knoll2012-10-171-2/+2
| | | | | Change-Id: I8ecf66667f1dfebc33715ba396cb4bf7d27535d0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* More changes to the new calling conventionLars Knoll2012-10-171-2/+2
| | | | | Change-Id: Icc22f2ed342ced9eac0d62307151acca8031d2c2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Generate correct code when calling valuesLars Knoll2012-10-171-1/+1
| | | | | | | | | __qmljs_call_value was still using a pointer to a Value. In addition, qcv4isel_masm.cpp was using a wrong order of the arguments. Change-Id: I0414aa732ae8074420e4f11525f5b04712cc1bab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Store integer constants as integer ValuesLars Knoll2012-10-171-3/+9
| | | | | | | | | | | | Generate integer Value's during instruction selection. Value is already prepared for it, so this simply speeds up integer heavy JS execution. Speeds up crypto.js by around 60% Change-Id: I3781767fd5b5c799365f3c75245409a9760ae7fb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert most operations to the new calling conventionLars Knoll2012-10-171-17/+20
| | | | | Change-Id: I2dbf61b215a03a3c44c9c6bc431859bb9d067625 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Small cleanupLars Knoll2012-10-171-2/+1
| | | | | Change-Id: I81f9f49df0ecd94081d111e691494ec746ca58ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Converting more runtime methods to the new calling conventionLars Knoll2012-10-161-9/+7
| | | | | Change-Id: I331e7ebe6479bc5b6bac9cf4e3e6506a1cae1053 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move conversions to new calling conventionLars Knoll2012-10-161-2/+4
| | | | | Change-Id: Iec01835b4fd27d8b71b7e709b05bcc757d09e417 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* More conversions to new calling conventionLars Knoll2012-10-161-3/+3
| | | | | Change-Id: I6002715cc3f5c22d90a9ade6ae2152c2c3c8ebb2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Converting more methods to the new calling conventionLars Knoll2012-10-161-4/+2
| | | | | Change-Id: I5199a9e5439644cc259f131c8b0ba6a941989615 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Converting more runtime methods.Lars Knoll2012-10-161-8/+8
| | | | | Change-Id: I9e5d73004e377cff2819cb82240d50e73c8bda94 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert Value constructors to new calling conventionLars Knoll2012-10-161-2/+2
| | | | | Change-Id: I433f72666499e660618b061cfcf3407f5f9bb166 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further convert runtime methods to the new calling conventionLars Knoll2012-10-161-2/+1
| | | | | | | Value bassed argument passing. Change-Id: I95e49ae301221e36946c2ce4f25081461513a6bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Start changing signatures of the runtime to being value based.Lars Knoll2012-10-161-2/+2
| | | | | | | | | Value's should be passed by value and returned by value between JIT and the JS runtime. This should give us better performance on x86_64 and ARM. Change-Id: I4fa286c6164f0143adb72d07c737fa273c8a5eb6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize boolean testSimon Hausmann2012-10-161-1/+1
| | | | | | | | Use != 0 instead of == 1, as it allows for a more efficient encoding on ia32/amd64 (using test eax, eax) Change-Id: I7a29139d8e6e9b843bf8df6f20f5ef7cc9b2e8cc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Prospective Mac OS X build fixSimon Hausmann2012-10-121-2/+8
| | | | | | | | open_memstream is not supported beyond Linux it seems, so do the symbol replacing disassembly printing only on Linux. Change-Id: I1eff6db9e10bd0ebbc06e967a61f998ee42438a8 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Add missing license headersSimon Hausmann2012-10-121-0/+40
| | | | | Change-Id: I59d602a0f2c1fefb03994ed32a3d697b176791ff Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clean up arithmetic operation callsSimon Hausmann2012-10-121-76/+112
| | | | | | | | Don't repeat calls to generateFunctionCall but use a helper macro to get the name. Change-Id: I394b1980cbd67f3ca94fc41402de2d5b99c45016 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Store booleans as 32 bit integersLars Knoll2012-10-121-2/+2
| | | | | | | | | | The old code was giving valgrind warnings, because we loaded the boolean (1 byte) as a 32 bit integer. Instead simply store all booleans as 32 bit ints to avoid the warnings. Change-Id: I46c7f9fc9d8dfe52afd9bab2dbab8923aaa630f8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Send all debug output to stderrLars Knoll2012-10-121-4/+7
| | | | | | | | qDebug() was used for part of the logging, which uses stderr. Send everything else there as well. Change-Id: I363dff3d2e4dd6f95bf0347f1df589ae2528fd32 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove almost all uses of __qmljs_init_stringLars Knoll2012-10-121-0/+1
| | | | | Change-Id: I88130ec39958c75b70d898a352423908ac2ef1d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix stack corruption on ia32Simon Hausmann2012-10-121-1/+3
| | | | | | | | | | | On ia32 sizeof(void*) < sizeof(Value), so we need to subtract sizeof(Value) instead of sizeof(void*) before reaching the first temp. Added comments to explain the offsets. Change-Id: Iefbb1dc762fdf36d73002c52dc9c471ec15ff403 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Initial build fixes for armSimon Hausmann2012-10-111-1/+3
|
* Implement copyValue using a single load/store pair in the common case of ↵Simon Hausmann2012-10-101-5/+2
| | | | copying temps
* Simplify boolean conditional jumpsSimon Hausmann2012-10-101-7/+5
| | | | | | * Expect the boolean value to be in Gpr0, which means after the __qmljs_to_boolean call the move(ReturnValueRegister, Gpr0) becomes a noop * Instead of loading the true/1 into a register, use it as immediate value in the cmp
* Make conditional jumps more readableSimon Hausmann2012-10-101-12/+10
|
* Fix stack corruptionLars Knoll2012-10-101-4/+3
| | | | | | The position of temporaries on the stack was off by 1, leading to us overwriting other r14, that gets pushed to the stack after we have allocated space for temps.
* Emit code for copying valuesLars Knoll2012-10-101-1/+5
| | | | Remove __qmljs_copy in the process.
* Work around gcc bug on amd64 with function pointer assignmentSimon Hausmann2012-10-101-87/+74
|
* Make it really work for 64 bit.Lars Knoll2012-10-101-0/+6
| | | | crypto.js passes now :)
* Fix rethrowSimon Hausmann2012-10-101-2/+4
|
* Centralize value copyingSimon Hausmann2012-10-091-3/+8
|
* Save and restore context register before callsSimon Hausmann2012-10-091-3/+6
|
* More debug infoSimon Hausmann2012-10-091-4/+4
|
* First shot at more readable call instructions in outputSimon Hausmann2012-10-091-1/+29
|
* Fix array subscript write: add missing context pointer argument to ↵Simon Hausmann2012-10-081-1/+1
| | | | qmljs_set_element call
* Add missing returnSimon Hausmann2012-10-071-0/+1
|
* Implement missing movsSimon Hausmann2012-10-071-5/+75
|
* implement visitExpSimon Hausmann2012-10-071-1/+12
|
* Implement construct property/valueSimon Hausmann2012-10-071-2/+14
|
* Implement call value and propertySimon Hausmann2012-10-071-0/+15
|
* Port remaining code to better function call mechanismSimon Hausmann2012-10-071-52/+17
|
* Fix closure initSimon Hausmann2012-10-071-1/+1
|
* Simplify more function callsSimon Hausmann2012-10-051-60/+10
|
* further call simplificationSimon Hausmann2012-10-051-17/+4
|