Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/wasm/regress/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  baseline-extend8.js   Sprache: JAVA

 
// This attempts to test that we can do an 8-bit sign extend no matter what the
// source register.  This test is arguably somewhat tied to the baseline
// compiler's register allocator, but is still appropriate for most simple
// register allocators.  It works by filling an increasing number of registers
// with values so as eventually to force the source operand for extend8_s into a
// register that does not have a byte personality.

for ( let i=0; i < 8; i++) {
    let txt =
        `(module
           (func (export "f") (param i32) (result i32)
           ${adds(i)}
           (local.set 0 (i32.extend8_s (i32.add (local.get 0) (i32.const 1))))
           ${drops(i)}
           (local.get 0)))`;
    let ins = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(txt)));
    assertEq(ins.exports.f(254), -1);
}

function adds(n) {
    let s = ""
    for ( let i=0; i < n; i++ )
        s += "(i32.add (local.get 0) (i32.const 1))\n";
    return s;
}

function drops(n) {
    let s = "";
    for ( let i=0; i < n; i++ )
        s += "drop\n";
    return s;
}



Messung V0.5
C=90 H=80 G=85

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.