-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
255 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
math/float/math32/z80/f32_r2ka_mulu_32h_24x24 | ||
math/float/math32/z80/f32_r2ka_mulu_32h_32x32 | ||
math/float/math32/z80/f32_r2ka_sqr_32h_24x24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
libsrc/_DEVELOPMENT/math/float/math32/z80/f32_r2ka_mulu_32h_24x24.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
; | ||
; feilipu, 2023 August | ||
; | ||
; This Source Code Form is subject to the terms of the Mozilla Public | ||
; License, v. 2.0. If a copy of the MPL was not distributed with this | ||
; file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
; | ||
;------------------------------------------------------------------------------ | ||
|
||
IF __CPU_R2KA__ | __CPU_R3K__ | ||
|
||
SECTION code_clib | ||
SECTION code_fp_math32 | ||
|
||
EXTERN l_mulu_64_32x32 | ||
|
||
PUBLIC m32_mulu_32h_24x24 | ||
|
||
;------------------------------------------------------------------------------ | ||
; | ||
; multiplication of two 24-bit numbers into a 32-bit high product | ||
; | ||
; result is calculated for highest 32-bit result | ||
; from a 48-bit calculation. | ||
; | ||
; lower 8 bits intended to provide rounding information for | ||
; IEEE floating point 24-bit mantissa calculations. | ||
; | ||
; enter : lde = 24-bit multiplicand = x | ||
; lde' = 24-bit multiplier = y | ||
; | ||
; exit : hlde = 32-bit product | ||
; | ||
; uses : af, bc, de, hl, bc', de', hl' | ||
|
||
|
||
.m32_mulu_32h_24x24 | ||
|
||
ld h,e ; shift to high order of 64_32x32 | ||
ld e,d ; 0lde -> deh0 | ||
ld d,l | ||
ld l,0 | ||
exx | ||
|
||
ld h,e ; shift to high order of 64_32x32 | ||
ld e,d ; 0lde -> deh0 | ||
ld d,l | ||
ld l,0 | ||
|
||
; multiplication of two 32-bit numbers into a 64-bit product | ||
; | ||
; enter : de hl = 32-bit multiplicand = x | ||
; de'hl'= 32-bit multiplier = y | ||
; | ||
; exit : dehl dehl' = 64-bit product | ||
; carry reset | ||
; | ||
; uses : af, bc, de, hl, bc', de', hl' | ||
|
||
call l_mulu_64_32x32 | ||
|
||
ex de,hl | ||
ret ; exit : HLDE = 32-bit high product | ||
|
||
ENDIF |
37 changes: 37 additions & 0 deletions
37
libsrc/_DEVELOPMENT/math/float/math32/z80/f32_r2ka_mulu_32h_32x32.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
; | ||
; feilipu, 2023 August | ||
; | ||
; This Source Code Form is subject to the terms of the Mozilla Public | ||
; License, v. 2.0. If a copy of the MPL was not distributed with this | ||
; file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
; | ||
;------------------------------------------------------------------------------ | ||
|
||
IF __CPU_R2KA__ | __CPU_R3K__ | ||
|
||
SECTION code_clib | ||
SECTION code_fp_math32 | ||
|
||
EXTERN l_mulu_64_32x32 | ||
|
||
PUBLIC m32_mulu_32h_32x32 | ||
|
||
;------------------------------------------------------------------------------ | ||
; | ||
; multiplication of two 32-bit numbers into the high bytes of 64-bit product | ||
; | ||
; | ||
; enter : dehl = 32-bit multiplicand = x x1x0 | ||
; dehl' = 32-bit multiplier = y y1y0 | ||
; | ||
; exit : dehl = 32-bit product = z z3z2 = y1y0 * x1x0 | ||
; carry reset | ||
; | ||
; uses : af, bc, de, hl, bc', de', hl' | ||
|
||
|
||
defc m32_mulu_32h_32x32 = l_mulu_64_32x32 | ||
|
||
; exit : DEHL = 32-bit product | ||
|
||
ENDIF |
63 changes: 63 additions & 0 deletions
63
libsrc/_DEVELOPMENT/math/float/math32/z80/f32_r2ka_sqr_32h_24x24.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
; | ||
; feilipu, 2023 August | ||
; | ||
; This Source Code Form is subject to the terms of the Mozilla Public | ||
; License, v. 2.0. If a copy of the MPL was not distributed with this | ||
; file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
; | ||
;------------------------------------------------------------------------------ | ||
|
||
IF __CPU_R2KA__ | __CPU_R3K__ | ||
|
||
SECTION code_clib | ||
SECTION code_fp_math32 | ||
|
||
EXTERN l_mulu_64_32x32 | ||
|
||
PUBLIC m32_sqr_32h_24x24 | ||
|
||
;------------------------------------------------------------------------------ | ||
; | ||
; square of two 24-bit numbers into a 32-bit product | ||
; | ||
; result is calculated for highest 32-bit result | ||
; from a 48-bit calculation. | ||
; | ||
; Lower 8 bits intended to provide rounding information for | ||
; IEEE floating point mantissa calculations. | ||
; | ||
; enter : abc = lde = 24-bit multiplier = x | ||
; | ||
; exit : hlde = 32-bit product | ||
; | ||
; uses : af, bc, de, hl, bc', de', hl' | ||
|
||
|
||
.m32_sqr_32h_24x24 | ||
|
||
ld h,e ; shift to high order of 64_32x32 | ||
ld e,d ; 0lde -> deh0 | ||
ld d,l | ||
ld l,0 | ||
|
||
ld de',de ; replicate multiplicand | ||
ex de,hl | ||
ld hl',de | ||
ex de,hl | ||
|
||
; multiplication of two 32-bit numbers into a 64-bit product | ||
; | ||
; enter : de hl = 32-bit multiplicand = x | ||
; de'hl'= 32-bit multiplier = y | ||
; | ||
; exit : dehl dehl' = 64-bit product | ||
; carry reset | ||
; | ||
; uses : af, bc, de, hl, bc', de', hl' | ||
|
||
call l_mulu_64_32x32 | ||
|
||
ex de,hl | ||
ret ; exit : HLDE = 32-bit high product | ||
|
||
ENDIF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
libsrc/_DEVELOPMENT/math/integer/r2ka/l_r2ka_mulu_16_16x16.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
libsrc/_DEVELOPMENT/math/integer/r2ka/l_r2ka_mulu_32_16x16.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
libsrc/_DEVELOPMENT/math/integer/r2ka/l_r2ka_mulu_32_32x32.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.