In Suse SLES 12, gcc (by default) emits warnings for unprototyped C functions. In conjunction with -Werror this makes the test suite unusable.
Also: in tests/unboxed-primitive-args/common.ml, fixed what looks like a harmless typo in the declaration of cleanup_float.
The latencies are based on wild guesses for the z10. Since newer z processors are out-of-order, basic-block scheduling could also be turned off entirely.
The locgr instruction is not available in z10, the baseline for this port.
Instead, generate pedestrian code with a conditional branch.
Pass -march=z10 to the assembler to enforce z10 compliance.
Without the special reloading implemented here, a 2-address instruction such as x := x + y' could be reloaded as 'x1 := x2 + y' with two different temporaries x1, x2 for x.
In PIC mode, Itailcall_imm should jumpt to the PLT of the called function.
Also: use %r7 rather than %r1 to pass the function pointer argument to caml_c_call. It can be that caml_c_call is in a different shared object than the caller. In this case, %r0 and %r1 can be destroyed by PLT stub code, according to the ELF ABI.
Use la/lay when possible for add immediate and sub immediate,
because these instructions support the case result <> argument.
Use 'and/or/xor immediate over low 32 bits' instructions.
Do this only if the top 32 bits of the constant are 0 (or/xor) or -1 (and).
Move the cold path (the one that calls the GC when alloc_ptr < alloc_limit)
as much as possible to the end of the function.
Use la and lay to produce shorter code.
New function emit_stack_adjust, which chooses the shortest instruction
that performs the required adjustment.
Later, this will be a good place to put cfi_adjust directives.
In emit.mlp, write %rN and %fN directly in `...` strings, instead of going through emit_gpr and emit_fpr.
Justification: for other ports like Power, several concrete asm syntaxes for register names exist, so it makes sense to abstract over them. This is not the case for z systems under Linux. Plus, using the concrete syntax directly makes it easier to review emit.mlp.