diff --git a/x86/machine.m4 b/x86/machine.m4
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d145b5b3726c191ce556da86f33f0d5b9f1e524a 100644
--- a/x86/machine.m4
+++ b/x86/machine.m4
@@ -0,0 +1,15 @@
+dnl AES_LAST_ROUND(a, b, c, d)
+dnl Leaves result in %edi
+dnl Note that we have to quote $ in constants.
+define(<AES_LAST_ROUND>, <
+	movl	%e<>$1<>x,%edi
+	andl	<$>0x000000ff,%edi
+	movl	%e<>$2<>x,%ebp
+	andl	<$>0x0000ff00,%ebp
+	orl	%ebp,%edi
+	movl	%e<>$3<>x,%ebp
+	andl	<$>0x00ff0000,%ebp
+	orl	%ebp,%edi
+	movl	%e<>$4<>x,%ebp
+	andl	<$>0xff000000,%ebp
+	orl	%ebp,%edi>)dnl