Added CPU instructions to all nasm source files.

FIXME: ctojr32 needs CPU 486 because it uses bswap.

committer: mfx <mfx> 1075806034 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2004-02-03 11:00:34 +00:00
parent 440b5b2608
commit b8e698bde3
17 changed files with 30 additions and 0 deletions

1
TODO
View File

@ -14,6 +14,7 @@ IMPORTANT PROBLEMS THAT SHOULD BE FIXED SOON:
- atari/tos is incompatible with upx 1.2 ???
- stub ctojr32 needs CPU 486 because of bswap
OTHER:

View File

@ -30,6 +30,7 @@
BITS 32
SECTION .text
CPU 386
%define PAGE_SIZE ( 1<<12)
%define szElf32_Ehdr 0x34

View File

@ -30,6 +30,7 @@
BITS 32
SECTION .text
CPU 386
;; control just falls through, after this part and compiled C code
;; are uncompressed.

View File

@ -32,6 +32,7 @@
BITS 32
SECTION .text
CPU 386
%define PAGE_SIZE ( 1<<12)
%define szElf32_Ehdr 0x34

View File

@ -35,6 +35,7 @@
BITS 16
ORG 0
SECTION .text
CPU 8086
; =============
; ============= ENTRY POINT
@ -78,7 +79,9 @@ cutpoint:
; ============= DECOMPRESSION
; =============
CPU 286
%include "n2b_d16.ash"
CPU 8086
; =============
; ============= CALLTRICK

View File

@ -33,6 +33,7 @@
BITS 32
SECTION .text
ORG 0
CPU 386
; =============
; ============= ENTRY POINT

View File

@ -33,6 +33,7 @@
BITS 16
ORG 0
SECTION .text
CPU 8086
; =============
; ============= ENTRY POINT
@ -83,9 +84,11 @@ do_copy:
; ============= DECOMPRESSION
; =============
CPU 286
%include "n2b_d8e.ash"
%include "n2d_d8e.ash"
%include "n2e_d8e.ash"
CPU 8086
; =============
; ============= RELOCATION

View File

@ -32,6 +32,7 @@
BITS 32
SECTION .text
CPU 386
%define jmps jmp short
%define jmpn jmp near

View File

@ -32,6 +32,7 @@
BITS 32
SECTION .text
CPU 386
%define jmps jmp short
%define jmpn jmp near

View File

@ -32,6 +32,7 @@
BITS 32
SECTION .text
CPU 386
%define jmps jmp short
%define jmpn jmp near

View File

@ -32,6 +32,7 @@
BITS 32
SECTION .text
CPU 386
; /*************************************************************************
; // program entry point

View File

@ -36,6 +36,7 @@
BITS 16
ORG 0
SECTION .text
CPU 8086
; =============
; ============= ENTRY POINT
@ -49,7 +50,9 @@ start:
dw 0 ; opendos wants this field untouched
strategy:
%ifdef __SYSI2861__
CPU 286
pusha
CPU 8086
%else; __SYSI0861__
push ax
push bx
@ -94,7 +97,9 @@ cutpoint:
; ============= DECOMPRESSION
; =============
CPU 286
%include "n2b_d16.ash"
CPU 8086
; =============
; ============= CALLTRICK
@ -106,7 +111,9 @@ cutpoint:
; __SYSMAIN5__
pop es
%ifdef __SYSI2862__
CPU 286
popa
CPU 8086
%else; __SYSI0862__
pop bp
pop di

View File

@ -33,6 +33,7 @@
BITS 32
SECTION .text
ORG 0
CPU 386
; =============
; ============= ENTRY POINT

View File

@ -36,6 +36,7 @@
BITS 32
SECTION .text
ORG 0
CPU 386
; =============
; ============= ENTRY POINT

View File

@ -33,6 +33,7 @@
BITS 32
SECTION .text
ORG 0
CPU 386
; =============
; ============= ENTRY POINT

View File

@ -282,6 +282,9 @@ reloc_endx:
;; MRUBYTEn 256 entries in wheel (smallest code)
%macro ctojr32 0
CPU 486 ; FIXME: ctojr32 uses bswap
;; I got confused by the syntactic sugar of the fake %ifdefs.
;; I can read the section name more easily when it is at the left margin.
;; Also, some of the logic to select the sections is not that simple,
@ -576,6 +579,7 @@ unfcount:
push edx
ret
CPU 386
%endmacro
; vi:ts=8:et:nowrap

View File

@ -27,6 +27,7 @@
BITS 32
SECTION .text
CPU 386
GLOBAL upx_itoa
upx_itoa: ; char *upx_itoa(eax= unsigned v, edx= char *buf) /* 0<=(int)v */