Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix: merge sections
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Jun 27, 2022
1 parent 5b50f11 commit de331b6
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 71 deletions.
64 changes: 32 additions & 32 deletions src/crt/i386/ftol2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,59 +9,59 @@

; Segment type: Zero-length
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
_text$mn ends
_TEXT$mn segment para public 'CODE' use32
_TEXT$mn ends

; Segment type: Zero-length
; Segment permissions: Read/Write
_data segment para public 'DATA' use32
_data ends
_DATA segment para public 'DATA' use32
_DATA ends

; Segment type: Pure data
; Segment permissions: Read

_rdata segment para public 'DATA' use32
assume cs:_rdata
_RDATA segment readonly para public 'DATA' use32
assume cs:_RDATA

two32 dd 4F800000h
two63 dd 5F000000h
_NaN dd 0FFFFFFFFh

_rdata ends
_RDATA ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftol2_sse_excpt
_ftol2_sse_excpt proc near
jmp _ftoi2
_ftol2_sse_excpt endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftol2_sse
_ftol2_sse proc near
jmp _ftoi2
_ftol2_sse endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftoi2
_ftoi2 proc near
Expand Down Expand Up @@ -119,14 +119,14 @@ L41:
mov eax, 80000000h
retn
_ftoi2 endp
_text$mn ends
_TEXT$mn ends


; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
public _ftoui2
_ftoui2 proc near
Expand Down Expand Up @@ -202,13 +202,13 @@ L99:
_ftoui2 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftol2
_ftol2 proc near
Expand Down Expand Up @@ -284,13 +284,13 @@ L57:
_ftol2 endp

align 10h
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftoul2
_ftoul2 proc near
Expand Down Expand Up @@ -372,8 +372,8 @@ LAF:
mov eax, 0FFFFFFFFh
cdq
retn
_ftoul2 endp
_text$mn ends
_ftoul2 endp
_TEXT$mn ends

; Segment type: Externs
extrn __isa_available:dword
Expand Down
78 changes: 39 additions & 39 deletions src/crt/i386/ftol3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@

; Segment type: Zero-length
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
_text$mn ends
_TEXT$mn segment para public 'CODE' use32
_TEXT$mn ends

; Segment type: Zero-length
; Segment permissions: Read/Write
_data segment para public 'DATA' use32
_data ends
_DATA segment para public 'DATA' use32
_DATA ends

; Segment type: Pure data
; Segment permissions: Read
_rdata segment para public 'DATA' use32
assume cs:_rdata
_RDATA segment readonly para public 'DATA' use32
assume cs:_RDATA

_NaN dd 0FFFFFFFFh
_onept5 dd 3FC00000h
_DP2to32 dq 0
qword_18 dq 41F0000000000000h

_rdata ends
_RDATA ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftoui3
_ftoui3 proc near
Expand Down Expand Up @@ -67,13 +67,13 @@ _ftoui3_NaN:
_ftoui3 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftoul3
_ftoul3 proc near
Expand Down Expand Up @@ -124,13 +124,13 @@ _ftoul3_NaN:
_ftoul3 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ftol3
_ftol3 proc near
Expand Down Expand Up @@ -177,13 +177,13 @@ _ftol3_retmin:
_ftol3 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _dtoui3
_dtoui3 proc near
Expand Down Expand Up @@ -227,13 +227,13 @@ _dtoui3_NaN:
dec eax
retn
_dtoui3 endp
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _dtoul3
_dtoul3 proc near
Expand Down Expand Up @@ -299,13 +299,13 @@ _dtoul3_NaN:
_dtoul3 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _dtol3
_dtol3 proc near
Expand Down Expand Up @@ -380,13 +380,13 @@ _dtol3_retmin:
retn

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ultod3
_ultod3 proc near
Expand Down Expand Up @@ -414,13 +414,13 @@ _ultod3_uint32:
_ultod3 endp

align 4
_text$mn ends
_TEXT$mn ends

; Segment type: Pure code
; Segment permissions: Read/Execute
_text$mn segment para public 'CODE' use32
assume cs:_text$mn
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing
_TEXT$mn segment para public 'CODE' use32
assume cs:_TEXT$mn
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing

public _ltod3
_ltod3 proc near
Expand All @@ -441,7 +441,7 @@ _ltod3_default:
addsd xmm0, xmm1
retn
_ltod3 endp
_text$mn ends
_TEXT$mn ends

; Segment type: Externs
extrn __isa_available:dword
Expand Down
19 changes: 19 additions & 0 deletions src/ucxxrt.cpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
/*
* PROJECT: Universal C++ RunTime (UCXXRT)
* FILE: ucxxrt.cpp
* DATA: 2022/06/27
*
* PURPOSE: Universal C++ RunTime
*
* LICENSE: Relicensed under The MIT License from The CC BY 4.0 License
*
* DEVELOPER: MiroKaku (miro.kaku AT Outlook.com)
*/


// Section
#pragma comment(linker, "/merge:_TEXT=.text")
#pragma comment(linker, "/merge:_DATA=.data")
#pragma comment(linker, "/merge:_RDATA=.rdata")


// Global
extern"C" ULONG __ucxxrt_tag = static_cast<ULONG>(_ByteSwap32('ucrt'));

0 comments on commit de331b6

Please sign in to comment.