forked from parrot/parrot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ABI_CHANGES
46 lines (31 loc) · 1.39 KB
/
ABI_CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# $Id$
This document describes changes to the Parrot ABI.
2004.11.27 leo
Removed oppodes:
abs I, N - irregular operand mix
lcm N, I, I - duplicate of lcm I,I,I with float result
rand * - deprecated before 0.1.1
Internally handled opcodes:
All binary, unary, compare, and branch opcodes with evaluable constant
arguments are replaced with equivalent results of the opcode, e.g.
add I0, 10, 20 => set I0, 30
eq 10, 10, L1 => branch L1
ne 10, 10, L1 => gets deleted
iseq I0, "a", "a" => set I0, 1
Opcodes with mixed I and N source arguments are replaced to take
either a FLOATVAL constant or with a sequence of opcodes, e.g.:
add N0, N1, 1 => add N0, N1, 1.0
add N0, N1, I2 => set $N0, I2
add N0, N1, $N0
sin N0, 2 => sin N0, 2.0
The compare and branch opcodes gt, ge, isgt, and isge for I, N, S
arguments are not emitted any more. They are replaced with their
counterparts with swapped arguments, e.g. :
gt I0, I1, L1 => lt I1, I0, L1
isge I0, 100, I2 => isle I0, I2, 100
While all these opcodes are valid to use, these are no more listed in
ops/ops.num nor generated. Compilers shouldn't emit these opcodes, as
it's slightly inefficient to create the equivalent opcodes.
2004.11.15 leo
The variables P0, P1, P2, S0 aren't visible in the called subroutine
anymore. See docs/pdds/pdd03_calling_conventions.pod.