Work in progress: Sakura master
Add --with-mc-stack-frames configure option. (Currently X86-64 only.)
This will enable frame pointers in machine code, thereby allowing e.g.
Linux perf to unwind the stack and get proper stack traces including
Inline the F_CATCH opcode (on AMD64 so far).
This is a prerequisite for MACHINE_CODE_STACK_FRAMES, since
inter_return_opcode_F_CATCH will "inject" itself on the C stack when the first
F_CATCH opcode is encountered (and won't vanish until inter return, which may
occur in an outer Pike frame).
Merge remote-tracking branch 'origin/master' into new_utf8
Merge commit '722771973bd' into patches/lyslyskom22891031
* commit '722771973bd': (6177 commits)
Verify that callablep responses are aligned with reality.
Compiler: Silence compiler warnings
GCC 8 got more picky about function pointer signatures, but there is
really no need to let those warnings bother us.
Merge commit '2470270f500c728d10b8895314d8d8b07016e37b' into grubba/typechecker-automap
* commit '2470270f500c728d10b8895314d8d8b07016e37b': (18681 commits)
Removed the old typechecker.
Merge remote-tracking branch 'origin/8.1' into gobject-introspection
Merge commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e' into patches/pike63
* commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e': (19587 commits)
Merge branch 'marty/call_frames' into 8.1
This introduces the --with-mc-stack-frames configure option, which will
instruct the machine code generator to insert proper stack frames (currently
only supported on X86-64). This is useful for profiling, especially in
combination with Debug.generate_perf_map() on Linux.
Use get_unaligned instead of EXTRACT_
Compiler [amd64]: First go at implementing DISASSEMBLE_CODE().
Work in progress; disassembly of SIB not yet implemented,
argument order is not correct in some cases, but it does disassemble
some opcodes correctly.
Normalized file ends.
Added F_CALL_BUILTIN_N and F_APPLY_N.
This calls the constant in arg1 with arg2 arguments from the stack.
These opcodes are used if the number of arguments is known and bigger
It is not really all that big an optimization, it only removes the
mark stack handling. And, in fact, due to the fact that it removes
some peep optimizations it might be somewhat slower when not using the
amd64 machine code (since, as an example, APPLY/ASSIGN_LOCAL/POP is no
longer an opcode that is used in this case).
However, when using the amd64 code the assign local + pop opcode is
higly optimized, so it's not an issue that it is not merged into the
apply opcode. It is in fact more of a feature.
For that reason the code in docode.c is currently conditional.
The only code generator using it is the amd64 one.
Since NULL is no longer possible, simplify CALL_MACHINE_CODE
Merge branch '8.0' into gobject-introspection
Merge branch '7.9' into gobject-introspection
Merge branch '7.9' into block_alloc
[compiler][amd64] Use new features from peep.c
Place the code for calling check_threads_etc before the function instead of
inside it, to have one branch less in tight loops.
This saves about 4% in the nested loops test, at the cost of 12 bytes extra
code-space for functions that do not actually contain loops (for functions
that contain loops 3 bytes is saved intead)
One alternative would have to place the code after the function, if it does
contain a loop, then update the relative jumps to point to the code.
That is left for later.
Interpreter mega patch: The global Pike_interpreter struct replaced with Pike_interpreter_pointer.
Compiler (amd64): Several bugfixes in the code-generator.
Compiler (amd64): Use MOV instead of LEA to save a byte.
Compiler: Support for machine-code for amd64 (aka x86_64) now seems to work.
Compiler: Implemented partial machine-code support for amd64 (aka x86_64).
Header file for amd64 code generation.