Commit 59a490e8 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Fixed code detection code.

Detail:
  The insertion of the SWI XOS_SynchroniseCodeAreas in the squeeze code
    defeated xpand's attempts to decipher the code.  xpand is now willing
    to look back up to 8 instructions for the SUB r8, r8, #&7C instruction.
Admin:
  Tested - xpand can now expand things squeezed by squeeze again.

Version 5.06. Tagged as 'squeeze-5_06'
parent 89042477
/* (5.05) /* (5.06)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 5.05 #define Module_MajorVersion_CMHG 5.06
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Mar 2001 #define Module_Date_CMHG 16 Mar 2001
#define Module_MajorVersion "5.05" #define Module_MajorVersion "5.06"
#define Module_Version 505 #define Module_Version 506
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "02 Mar 2001" #define Module_Date "16 Mar 2001"
#define Module_ApplicationDate2 "02-Mar-01" #define Module_ApplicationDate2 "16-Mar-01"
#define Module_ApplicationDate4 "02-Mar-2001" #define Module_ApplicationDate4 "16-Mar-2001"
#define Module_ComponentName "squeeze" #define Module_ComponentName "squeeze"
#define Module_ComponentPath "RiscOS/Tools/Sources/squeeze" #define Module_ComponentPath "RiscOS/Tools/Sources/squeeze"
#define Module_FullVersion "5.05" #define Module_FullVersion "5.06"
#define Module_HelpVersion "5.05 (02 Mar 2001)" #define Module_HelpVersion "5.06 (16 Mar 2001)"
...@@ -234,10 +234,14 @@ static int xpand(char *in, char *out) ...@@ -234,10 +234,14 @@ static int xpand(char *in, char *out)
*lastw != MOV_PC_R8) *lastw != MOV_PC_R8)
fatalerror("format error in '%s'", in); fatalerror("format error in '%s'", in);
if (isaif) { if (isaif) {
if (*(lastw-1) != (SUB_R8_R8_0 | 0x7c)) int backwards;
fatalerror("aif format error in '%s'", in); for (backwards = 1; backwards < 8; ++backwards) {
*(lastw-1) = (SUB_R8_R8_0 | 0x80); if (*(lastw-backwards) == (SUB_R8_R8_0 | 0x7c)) break;
}
if (backwards == 8) {
fatalerror("aif format error in '%s' (end of expansion code not found)", in);
}
*(lastw-backwards) = (SUB_R8_R8_0 | 0x80);
} else { } else {
int execoffset = 0; int execoffset = 0;
for (;; lastw--) { for (;; lastw--) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment