()
| 223 | |
| 224 | #[test] |
| 225 | fn 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 |
no outgoing calls
no test coverage detected