aboutsummaryrefslogtreecommitdiff
path: root/ia32
diff options
context:
space:
mode:
Diffstat (limited to 'ia32')
-rw-r--r--ia32/elf/begin.sts1
-rw-r--r--ia32/elf/syscall.sts (renamed from ia32/syscall.sts)0
-rw-r--r--ia32/float/float.sts37
-rw-r--r--ia32/ia32.sts1
-rw-r--r--ia32/math.sts6
5 files changed, 40 insertions, 5 deletions
diff --git a/ia32/elf/begin.sts b/ia32/elf/begin.sts
index 27b4714..8dab930 100644
--- a/ia32/elf/begin.sts
+++ b/ia32/elf/begin.sts
@@ -125,4 +125,5 @@ _return_stack ?.
# ff ?' # 20 ?'
module ia32/ia32.sts
+module ia32/elf/syscall.sts
module common/common.sts
diff --git a/ia32/syscall.sts b/ia32/elf/syscall.sts
index 3acfef2..3acfef2 100644
--- a/ia32/syscall.sts
+++ b/ia32/elf/syscall.sts
diff --git a/ia32/float/float.sts b/ia32/float/float.sts
new file mode 100644
index 0000000..158781c
--- /dev/null
+++ b/ia32/float/float.sts
@@ -0,0 +1,37 @@
+defasm float_init
+ # 9b ?' ; wait
+ # db ?' # e3 ?' ; fninit
+next
+
+defasm float_fload
+ # d9 ?' # 04 ?' # 24 ?' ; fld dword [esp]
+ # 58 ?' ; pop eax
+next
+
+defasm float_iload
+ # db ?' # 04 ?' # 24 ?' ; fild dword [esp]
+ # 58 ?' ; pop eax
+next
+
+defasm float_fstore
+ # 50 ?' ; push eax
+ # d9 ?' # 1c ?' # 24 ?' ; fstp dword [esp]
+next
+
+defasm float_istore
+ # 50 ?' ; push eax
+ # db ?' # 1c ?' # 24 ?' ; fistp dword [esp]
+next
+
+defasm float_status
+ # de ?' # f9 ?' ; fnstsw ax
+ # 50 ?' ; push eax
+next
+
+defasm float_add
+ # de ?' # c1 ?' ; faddp st1, st0
+next
+
+defasm float_div
+ # de ?' # f9 ?' ; fdivp st1, st0
+next
diff --git a/ia32/ia32.sts b/ia32/ia32.sts
index 0d8a9f5..38b5919 100644
--- a/ia32/ia32.sts
+++ b/ia32/ia32.sts
@@ -6,4 +6,3 @@ module ia32/branch.sts
module ia32/memory.sts
module ia32/math.sts
module ia32/bitwise.sts
-module ia32/syscall.sts
diff --git a/ia32/math.sts b/ia32/math.sts
index fefe1d4..609a21a 100644
--- a/ia32/math.sts
+++ b/ia32/math.sts
@@ -8,12 +8,10 @@ defasm -
# 29 ?' # 04 ?' # 24 ?' ; sub [esp], eax
next
-defasm /
+defasm mul
# 5b ?' ; pop ebx
# 58 ?' ; pop eax
- # 31 ?' # d2 ?' ; xor edx, edx
- # f7 ?' # f3 ?' ; div ebx
- # 52 ?' ; push edx
+ # f7 ?' # e3 ?' ; mul ebx
# 50 ?' ; push eax
next