mirror of
https://github.com/upx/upx.git
synced 2024-11-30 16:11:08 +00:00
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:
parent
440b5b2608
commit
b8e698bde3
1
TODO
1
TODO
@ -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:
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
%define PAGE_SIZE ( 1<<12)
|
||||
%define szElf32_Ehdr 0x34
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
;; control just falls through, after this part and compiled C code
|
||||
;; are uncompressed.
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
%define PAGE_SIZE ( 1<<12)
|
||||
%define szElf32_Ehdr 0x34
|
||||
|
@ -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
|
||||
|
@ -33,6 +33,7 @@
|
||||
BITS 32
|
||||
SECTION .text
|
||||
ORG 0
|
||||
CPU 386
|
||||
|
||||
; =============
|
||||
; ============= ENTRY POINT
|
||||
|
@ -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
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
%define jmps jmp short
|
||||
%define jmpn jmp near
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
%define jmps jmp short
|
||||
%define jmpn jmp near
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
%define jmps jmp short
|
||||
%define jmpn jmp near
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
BITS 32
|
||||
SECTION .text
|
||||
CPU 386
|
||||
|
||||
; /*************************************************************************
|
||||
; // program entry point
|
||||
|
@ -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
|
||||
|
@ -33,6 +33,7 @@
|
||||
BITS 32
|
||||
SECTION .text
|
||||
ORG 0
|
||||
CPU 386
|
||||
|
||||
; =============
|
||||
; ============= ENTRY POINT
|
||||
|
@ -36,6 +36,7 @@
|
||||
BITS 32
|
||||
SECTION .text
|
||||
ORG 0
|
||||
CPU 386
|
||||
|
||||
; =============
|
||||
; ============= ENTRY POINT
|
||||
|
@ -33,6 +33,7 @@
|
||||
BITS 32
|
||||
SECTION .text
|
||||
ORG 0
|
||||
CPU 386
|
||||
|
||||
; =============
|
||||
; ============= ENTRY POINT
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user