Bug 1569137: Use the baldrdash calling convention for libcall expansion; r=jseward

Differential Revision: https://phabricator.services.mozilla.com/D40610

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Benjamin Bouvier 2019-08-13 17:05:48 +00:00
Родитель 5e07bfcb44
Коммит 7f699ce0f7
2 изменённых файлов: 68 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,65 @@
let { exports: { f } } = wasmEvalText(`
(module
(memory $0 1 1)
(func (export "f") (result f32)
(local $0 i32) (local $1 f64) (local $2 i32)
(set_local 0 (i32.const 134219779))
(set_local 1 (f64.const 3810600700439633677210579e165))
(f32.floor
(loop $label$2 (result f32)
(br_if $label$2
(i32.load offset=3 align=2
(block $label$4 (result i32)
(drop
(if (result f64)
(br_if $label$4
(i32.const 4883)
(i32.const -124)
)
(f64.const 77)
(block (result f64)
(drop
(br_if $label$4
(i32.const 4194304)
(i32.const -8192)
)
)
(return
(f32.const 4294967296)
)
)
)
)
(br_if $label$4
(br_if $label$4
(i32.const -90)
(br_if $label$4
(br_if $label$4
(local.get $2)
(i32.const -16)
)
(i32.const 15656)
)
)
(block $label$18 (result i32)
(i32.eqz
(br_if $label$4
(i32.const -1)
(i32.const 15)
)
)
)
)
)
)
)
(f32.const 23)
)
)
)
)`);
f();

Просмотреть файл

@ -109,6 +109,9 @@ fn make_shared_flags(env_flags: &Option<EnvVariableFlags>) -> settings::SetResul
//
sb.set("baldrdash_prologue_words", "3")?;
// Make sure that libcalls use the supplementary VMContext argument.
sb.set("libcall_call_conv", "baldrdash")?;
// Assembler::PatchDataWithValueCheck expects -1 stored where a function address should be
// patched in.
sb.enable("allones_funcaddrs")?;