diff options
author | exegete <nikitf-97@mail.ru> | 2020-10-17 16:40:23 +0300 |
---|---|---|
committer | exegete <nikitf-97@mail.ru> | 2020-10-17 16:40:23 +0300 |
commit | 65c54a8986b3519c1949d280e58f46af2eceff85 (patch) | |
tree | 0c2a20ec51f0ca2d1472b8df3dd79871e544d99a /ia32 | |
parent | b6b9e29c1484c9c8b8af2b382d3a9d796c310217 (diff) | |
download | cryptrobber-65c54a8986b3519c1949d280e58f46af2eceff85.tar cryptrobber-65c54a8986b3519c1949d280e58f46af2eceff85.tar.xz cryptrobber-65c54a8986b3519c1949d280e58f46af2eceff85.zip |
float, constants, ets
Diffstat (limited to 'ia32')
-rw-r--r-- | ia32/elf/begin.sts | 1 | ||||
-rw-r--r-- | ia32/elf/syscall.sts (renamed from ia32/syscall.sts) | 0 | ||||
-rw-r--r-- | ia32/float/float.sts | 37 | ||||
-rw-r--r-- | ia32/ia32.sts | 1 | ||||
-rw-r--r-- | ia32/math.sts | 6 |
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 |