diff runtime.S @ 547:3090d016c9e9

Generate get_sr, set_sr and set_ccr at runtime so they can respect the flag_regs setting
author Michael Pavone <pavone@retrodev.com>
date Tue, 18 Feb 2014 20:32:10 -0800
parents 67cf0ce57d8d
children 6b248602ab84 5a6ff0d76032
line wrap: on
line diff
--- a/runtime.S	Mon Feb 17 19:58:37 2014 -0800
+++ b/runtime.S	Tue Feb 18 20:32:10 2014 -0800
@@ -70,56 +70,5 @@
 	mov %rdi, %rax
 	ret
 
-	.global get_sr
-get_sr:
-	mov 5(%rsi), %cl
-	shl $8, %cx
-	mov (%rsi), %cl
-	shl $1, %cl
-	or %bl, %cl
-	shl $1, %cl
-	or %dl, %cl
-	shl $1, %cl
-	or %bh, %cl
-	shl $1, %cl
-	or %dh, %cl
-	ret
 
-	.global set_sr
-set_sr:
-	mov %cl, %dh
-	and $1, %dh
-	shr $1, %cl
-	mov %cl, %bh
-	and $1, %bh
-	shr $1, %cl
-	mov %cl, %dl
-	and $1, %dl
-	shr $1, %cl
-	mov %cl, %bl
-	and $1, %bl
-	shr $1, %cl
-	and $1, %cl
-	mov %cl, (%rsi)
-	shr $8, %cx
-	mov %cl, 5(%rsi)
-	ret
 
-	.global set_ccr
-set_ccr:
-	mov %cl, %dh
-	and $1, %dh
-	shr $1, %cl
-	mov %cl, %bh
-	and $1, %bh
-	shr $1, %cl
-	mov %cl, %dl
-	and $1, %dl
-	shr $1, %cl
-	mov %cl, %bl
-	and $1, %bl
-	shr $1, %cl
-	and $1, %cl
-	mov %cl, (%rsi)
-	ret
-