File: machine.m4

package info (click to toggle)
nettle 3.5.1+really3.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,012 kB
  • sloc: ansic: 51,527; asm: 12,157; sh: 3,632; makefile: 846; cpp: 71; awk: 7
file content (16 lines) | stat: -rw-r--r-- 380 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
C OFFSET(i)
C Expands to 4*i, or to the empty string if i is zero
define(<OFFSET>, <ifelse($1,0,,eval(4*$1))>)

dnl LREG(reg) gives the 8-bit register corresponding to the given 32-bit register.
define(<LREG>,<ifelse(
	$1, %eax, %al,
	$1, %ebx, %bl,
	$1, %ecx, %cl,
	$1, %edx, %dl)>)dnl

define(<HREG>,<ifelse(
	$1, %eax, %ah,
	$1, %ebx, %bh,
	$1, %ecx, %ch,
	$1, %edx, %dh)>)dnl