aboutsummaryrefslogtreecommitdiff
path: root/S/byte_zero.S
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /S/byte_zero.S
bulk upload of source
Diffstat (limited to 'S/byte_zero.S')
-rw-r--r--S/byte_zero.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/S/byte_zero.S b/S/byte_zero.S
new file mode 100644
index 0000000..01c166b
--- /dev/null
+++ b/S/byte_zero.S
@@ -0,0 +1,16 @@
+.globl byte_zero
+.type byte_zero, @function
+byte_zero:
+ xorb %al, %al
+
+.globl byte_zero_end
+byte_zero_end:
+ pushl %edi
+ movl 8(%esp), %edi
+ movl 12(%esp), %ecx
+
+ cld
+ rep stosb
+
+ popl %edi
+ ret