regmask_other.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //go:build !amd64
  2. // +build !amd64
  3. package flate
  4. const (
  5. // Masks for shifts with register sizes of the shift value.
  6. // This can be used to work around the x86 design of shifting by mod register size.
  7. // It can be used when a variable shift is always smaller than the register size.
  8. // reg8SizeMaskX - shift value is 8 bits, shifted is X
  9. reg8SizeMask8 = 0xff
  10. reg8SizeMask16 = 0xff
  11. reg8SizeMask32 = 0xff
  12. reg8SizeMask64 = 0xff
  13. // reg16SizeMaskX - shift value is 16 bits, shifted is X
  14. reg16SizeMask8 = 0xffff
  15. reg16SizeMask16 = 0xffff
  16. reg16SizeMask32 = 0xffff
  17. reg16SizeMask64 = 0xffff
  18. // reg32SizeMaskX - shift value is 32 bits, shifted is X
  19. reg32SizeMask8 = 0xffffffff
  20. reg32SizeMask16 = 0xffffffff
  21. reg32SizeMask32 = 0xffffffff
  22. reg32SizeMask64 = 0xffffffff
  23. // reg64SizeMaskX - shift value is 64 bits, shifted is X
  24. reg64SizeMask8 = 0xffffffffffffffff
  25. reg64SizeMask16 = 0xffffffffffffffff
  26. reg64SizeMask32 = 0xffffffffffffffff
  27. reg64SizeMask64 = 0xffffffffffffffff
  28. // regSizeMaskUintX - shift value is uint, shifted is X
  29. regSizeMaskUint8 = ^uint(0)
  30. regSizeMaskUint16 = ^uint(0)
  31. regSizeMaskUint32 = ^uint(0)
  32. regSizeMaskUint64 = ^uint(0)
  33. )