MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / replace

Function replace

cranelift/assembler-x64/src/fuzz.rs:225–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223
224#[test]
225fn replace() {
226 assert_eq!(
227 replace_signed_immediates("andl $0xffffff9a, %r11d"),
228 "andl $-0x66, %r11d"
229 );
230 assert_eq!(
231 replace_signed_immediates("xorq $0xffffffffffffffbc, 0x7f139ecc(%r9)"),
232 "xorq $-0x44, 0x7f139ecc(%r9)"
233 );
234 assert_eq!(
235 replace_signed_immediates("subl $0x3ca77a19, -0x1a030f40(%r14)"),
236 "subl $0x3ca77a19, -0x1a030f40(%r14)"
237 );
238 assert_eq!(
239 replace_signed_immediates("movq $0xffffffff864ae103, %rsi"),
240 "movq $18446744071667638531, %rsi"
241 );
242}
243
244/// Remove everything after the first semicolon in the disassembly and trim any
245/// trailing spaces. This is necessary to remove the implicit operands we end up

Callers 15

seal_one_blockMethod · 0.50
setMethod · 0.50
renameMethod · 0.50
take_commentsMethod · 0.50
enter_scopeMethod · 0.50
finish_currentMethod · 0.50
dropMethod · 0.50
nextMethod · 0.50
next_backMethod · 0.50
set_thread_profilerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected