Raymond Toy pushed to branch issue-185-x86-shorter-insts at cmucl / cmucl
Commits:
-
54ba7245
by Carl S. Shapiro at 2023-04-25T23:53:54+00:00
1 changed file:
Changes:
| ... | ... | @@ -1304,19 +1304,12 @@ |
| 1304 | 1304 | |
| 1305 | 1305 | (defun arith-logical-constant-control (chunk inst stream dstate)
|
| 1306 | 1306 | (declare (ignore inst stream))
|
| 1307 | - (let ((opcode (ldb (byte 8 0) chunk))
|
|
| 1308 | - (signed-imm-data (ldb (byte 8 16) chunk)))
|
|
| 1309 | - ;; See emit-random-arith-inst for the case where we use an 8-bit
|
|
| 1310 | - ;; signed immediate value in the instruction. We print a note
|
|
| 1311 | - ;; only if we have a 8-bit immediate and the 8-bit value is
|
|
| 1312 | - ;; negative (MSB is 1).
|
|
| 1313 | - (when (and (= opcode #b10000011)
|
|
| 1314 | - (logbitp 7 signed-imm-data))
|
|
| 1315 | - (disassem:note #'(lambda (stream)
|
|
| 1316 | - (princ (ldb (byte 32 0)
|
|
| 1317 | - (sign-extend signed-imm-data 8))
|
|
| 1318 | - stream))
|
|
| 1319 | - dstate))))
|
|
| 1307 | + (when (= (ldb (byte 8 0) chunk) #b10000011)
|
|
| 1308 | + (let ((imm (sign-extend (ldb (byte 8 16) chunk) 8)))
|
|
| 1309 | + (when (minusp imm)
|
|
| 1310 | + (disassem:note #'(lambda (stream)
|
|
| 1311 | + (princ (ldb (byte 32 0) imm) stream))
|
|
| 1312 | + dstate)))))
|
|
| 1320 | 1313 | |
| 1321 | 1314 | (eval-when (compile eval)
|
| 1322 | 1315 | (defun arith-inst-printer-list (subop &key control)
|