# HAL shims

Some architectures... well, *two* architectures are very close to each other,
yet not exactly them same. So be able to share some code, they need shim words.
This unit provide those shim words.

Loading this unit on a CPU that doesn't need it is harmless, it's an empty unit.

## i386 amd64

src) ( op -- op )
  Transform a i386/amd64 HAL operand into a suitable "src" asm/x86 opmod.

  In particular, mask out HAL flags, transform HALDIRECT into mod=3 in mod/rm.
  On amd64, OR in the op's REX flags into asm/x86's "rex" value.

mem) ( opmod -- opmod )
  i386   noop
  amd64  bp r+)

  Needed whenever an opmod points to an address in memory. Example:

    bx ax mem) 0 d) mov,

mem+, ( opmod -- )
  i386   noop
  amd64  rex.w bp add,

  Needed whenever we have a pointer from Dusk that we want to pass to an
  external function that needs an absolute pointer. Example:

  ax mem+,

mem-, ( opmod -- )
  i386   noop
  amd64  rex.w bp sub,

  Needed whenever we have a pointer from an external source that we want to use
  in Dusk. Example:

  ax mem-,
