papermario/ver/us/asm/nonmatchings/os/ldiv/ldiv.s
alex a4e1c2f522
Add versioning (#187)
* fix vscode cpp extension messing with files.associations

* move stuff

* it builds!

* symlink papermario.us.z64

* ci: put baserom in right place

* add jp

* fix splat dir

* ignore starrod dump

* .s deps

* update jenkins

* add dsl back

* configure.py versions

* wups

* fine ethan

* fix paths

* configure: default to only the version(s) with existing baseroms

* fix coverage

* fix progress.py

* progress.py verisoning

* remove format.sh from CONTRIBUTING

* update CONTRIBUTING

* fix first_diff

* diff.py: use ver/current/

* update splat.yaml

* trying to fix subrepo

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "06a737f02d"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "06a737f02d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* configure fix

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "41786effd3"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "41786effd3"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-02-22 18:21:23 +09:00

41 lines
1.8 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel ldiv
/* 48A20 8006D620 00A6001A */ div $zero, $a1, $a2
/* 48A24 8006D624 14C00002 */ bnez $a2, .L8006D630
/* 48A28 8006D628 00000000 */ nop
/* 48A2C 8006D62C 0007000D */ break 7
.L8006D630:
/* 48A30 8006D630 2401FFFF */ addiu $at, $zero, -1
/* 48A34 8006D634 14C10004 */ bne $a2, $at, .L8006D648
/* 48A38 8006D638 3C018000 */ lui $at, 0x8000
/* 48A3C 8006D63C 14A10002 */ bne $a1, $at, .L8006D648
/* 48A40 8006D640 00000000 */ nop
/* 48A44 8006D644 0006000D */ break 6
.L8006D648:
/* 48A48 8006D648 00001812 */ mflo $v1
/* 48A4C 8006D64C 00000000 */ nop
/* 48A50 8006D650 00000000 */ nop
/* 48A54 8006D654 00C30018 */ mult $a2, $v1
/* 48A58 8006D658 00001012 */ mflo $v0
/* 48A5C 8006D65C 27BDFFF8 */ addiu $sp, $sp, -8
/* 48A60 8006D660 00803821 */ addu $a3, $a0, $zero
/* 48A64 8006D664 AFA30000 */ sw $v1, ($sp)
/* 48A68 8006D668 00A22823 */ subu $a1, $a1, $v0
/* 48A6C 8006D66C 04610006 */ bgez $v1, .L8006D688
/* 48A70 8006D670 AFA50004 */ sw $a1, 4($sp)
/* 48A74 8006D674 18A00004 */ blez $a1, .L8006D688
/* 48A78 8006D678 24620001 */ addiu $v0, $v1, 1
/* 48A7C 8006D67C AFA20000 */ sw $v0, ($sp)
/* 48A80 8006D680 00A61023 */ subu $v0, $a1, $a2
/* 48A84 8006D684 AFA20004 */ sw $v0, 4($sp)
.L8006D688:
/* 48A88 8006D688 8FA20000 */ lw $v0, ($sp)
/* 48A8C 8006D68C 8FA30004 */ lw $v1, 4($sp)
/* 48A90 8006D690 ACE20000 */ sw $v0, ($a3)
/* 48A94 8006D694 ACE30004 */ sw $v1, 4($a3)
/* 48A98 8006D698 00E01021 */ addu $v0, $a3, $zero
/* 48A9C 8006D69C 03E00008 */ jr $ra
/* 48AA0 8006D6A0 27BD0008 */ addiu $sp, $sp, 8