-(defmacro move (src dst)
- "Move SRC into DST unless they are location=."
- (once-only ((src src) (dst dst))
- `(unless (location= ,src ,dst)
- (inst move ,src ,dst))))
+(defmacro expand (expr)
+ (let ((gensym (gensym)))
+ `(macrolet
+ ((,gensym ()
+ ,expr))
+ (,gensym))))
+
+;;; Instruction-like macros.
+;;; FIXME-lav: add if always-emit-code-p is :e= then error if location=
+(defmacro move (src dst &optional always-emit-code-p)
+ #!+sb-doc
+ "Move SRC into DST (unless they are location= and ALWAYS-EMIT-CODE-P is nil)."
+ (once-only ((n-src src)
+ (n-dst dst))
+ `(if (location= ,n-dst ,n-src)
+ (when ,always-emit-code-p
+ (inst nop))
+ (inst move ,n-src ,n-dst))))