To keep cross-compiling straightforward, Cretonne shouldn't have any behavior that depends on the host. This renames the "Native" calling convention to "SystemV", which has a defined meaning for each target, so that it's clear that the calling convention doesn't change depending on what host Cretonne is running on.
14 lines
250 B
Plaintext
14 lines
250 B
Plaintext
test verifier
|
|
|
|
function %gcd(i32 uext, i32 uext) -> i32 uext system_v {
|
|
fn1 = function %divmod(i32 uext, i32 uext) -> i32 uext, i32 uext
|
|
|
|
ebb1(v1: i32, v2: i32):
|
|
brz v2, ebb2
|
|
v3, v4 = call fn1(v1, v2)
|
|
return v3
|
|
|
|
ebb2:
|
|
return v1
|
|
}
|