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:
@@ -14,6 +14,7 @@ IMPORTANT PROBLEMS THAT SHOULD BE FIXED SOON:
|
|||||||
|
|
||||||
- atari/tos is incompatible with upx 1.2 ???
|
- atari/tos is incompatible with upx 1.2 ???
|
||||||
|
|
||||||
|
- stub ctojr32 needs CPU 486 because of bswap
|
||||||
|
|
||||||
|
|
||||||
OTHER:
|
OTHER:
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
%define PAGE_SIZE ( 1<<12)
|
%define PAGE_SIZE ( 1<<12)
|
||||||
%define szElf32_Ehdr 0x34
|
%define szElf32_Ehdr 0x34
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
;; control just falls through, after this part and compiled C code
|
;; control just falls through, after this part and compiled C code
|
||||||
;; are uncompressed.
|
;; are uncompressed.
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
%define PAGE_SIZE ( 1<<12)
|
%define PAGE_SIZE ( 1<<12)
|
||||||
%define szElf32_Ehdr 0x34
|
%define szElf32_Ehdr 0x34
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
BITS 16
|
BITS 16
|
||||||
ORG 0
|
ORG 0
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
@@ -78,7 +79,9 @@ cutpoint:
|
|||||||
; ============= DECOMPRESSION
|
; ============= DECOMPRESSION
|
||||||
; =============
|
; =============
|
||||||
|
|
||||||
|
CPU 286
|
||||||
%include "n2b_d16.ash"
|
%include "n2b_d16.ash"
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= CALLTRICK
|
; ============= CALLTRICK
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
ORG 0
|
ORG 0
|
||||||
|
CPU 386
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
BITS 16
|
BITS 16
|
||||||
ORG 0
|
ORG 0
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
@@ -83,9 +84,11 @@ do_copy:
|
|||||||
; ============= DECOMPRESSION
|
; ============= DECOMPRESSION
|
||||||
; =============
|
; =============
|
||||||
|
|
||||||
|
CPU 286
|
||||||
%include "n2b_d8e.ash"
|
%include "n2b_d8e.ash"
|
||||||
%include "n2d_d8e.ash"
|
%include "n2d_d8e.ash"
|
||||||
%include "n2e_d8e.ash"
|
%include "n2e_d8e.ash"
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= RELOCATION
|
; ============= RELOCATION
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
%define jmps jmp short
|
%define jmps jmp short
|
||||||
%define jmpn jmp near
|
%define jmpn jmp near
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
%define jmps jmp short
|
%define jmps jmp short
|
||||||
%define jmpn jmp near
|
%define jmpn jmp near
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
%define jmps jmp short
|
%define jmps jmp short
|
||||||
%define jmpn jmp near
|
%define jmpn jmp near
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
|
|
||||||
; /*************************************************************************
|
; /*************************************************************************
|
||||||
; // program entry point
|
; // program entry point
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
BITS 16
|
BITS 16
|
||||||
ORG 0
|
ORG 0
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
@@ -49,7 +50,9 @@ start:
|
|||||||
dw 0 ; opendos wants this field untouched
|
dw 0 ; opendos wants this field untouched
|
||||||
strategy:
|
strategy:
|
||||||
%ifdef __SYSI2861__
|
%ifdef __SYSI2861__
|
||||||
|
CPU 286
|
||||||
pusha
|
pusha
|
||||||
|
CPU 8086
|
||||||
%else; __SYSI0861__
|
%else; __SYSI0861__
|
||||||
push ax
|
push ax
|
||||||
push bx
|
push bx
|
||||||
@@ -94,7 +97,9 @@ cutpoint:
|
|||||||
; ============= DECOMPRESSION
|
; ============= DECOMPRESSION
|
||||||
; =============
|
; =============
|
||||||
|
|
||||||
|
CPU 286
|
||||||
%include "n2b_d16.ash"
|
%include "n2b_d16.ash"
|
||||||
|
CPU 8086
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= CALLTRICK
|
; ============= CALLTRICK
|
||||||
@@ -106,7 +111,9 @@ cutpoint:
|
|||||||
; __SYSMAIN5__
|
; __SYSMAIN5__
|
||||||
pop es
|
pop es
|
||||||
%ifdef __SYSI2862__
|
%ifdef __SYSI2862__
|
||||||
|
CPU 286
|
||||||
popa
|
popa
|
||||||
|
CPU 8086
|
||||||
%else; __SYSI0862__
|
%else; __SYSI0862__
|
||||||
pop bp
|
pop bp
|
||||||
pop di
|
pop di
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
ORG 0
|
ORG 0
|
||||||
|
CPU 386
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
ORG 0
|
ORG 0
|
||||||
|
CPU 386
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
ORG 0
|
ORG 0
|
||||||
|
CPU 386
|
||||||
|
|
||||||
; =============
|
; =============
|
||||||
; ============= ENTRY POINT
|
; ============= ENTRY POINT
|
||||||
|
|||||||
@@ -282,6 +282,9 @@ reloc_endx:
|
|||||||
;; MRUBYTEn 256 entries in wheel (smallest code)
|
;; MRUBYTEn 256 entries in wheel (smallest code)
|
||||||
|
|
||||||
%macro ctojr32 0
|
%macro ctojr32 0
|
||||||
|
|
||||||
|
CPU 486 ; FIXME: ctojr32 uses bswap
|
||||||
|
|
||||||
;; I got confused by the syntactic sugar of the fake %ifdefs.
|
;; 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.
|
;; 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,
|
;; Also, some of the logic to select the sections is not that simple,
|
||||||
@@ -576,6 +579,7 @@ unfcount:
|
|||||||
push edx
|
push edx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
CPU 386
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
; vi:ts=8:et:nowrap
|
; vi:ts=8:et:nowrap
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
SECTION .text
|
SECTION .text
|
||||||
|
CPU 386
|
||||||
GLOBAL upx_itoa
|
GLOBAL upx_itoa
|
||||||
|
|
||||||
upx_itoa: ; char *upx_itoa(eax= unsigned v, edx= char *buf) /* 0<=(int)v */
|
upx_itoa: ; char *upx_itoa(eax= unsigned v, edx= char *buf) /* 0<=(int)v */
|
||||||
|
|||||||
Reference in New Issue
Block a user