mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 13:29:27 +02:00
Merge of rev21557 by Foxsen
Make macro MIPS/CPUMIPS/MIPS32 common for big endian and little endian mips processors use MIPSEL* for little endian systems use MIPSEB* for big endian systems git-svn-id: trunk@21599 -
This commit is contained in:
parent
90fd8d8962
commit
600dd162af
@ -1177,7 +1177,7 @@ implementation
|
||||
else
|
||||
AsmWriteln(tai_symbol(hp).sym.name);
|
||||
end;
|
||||
if target_info.system in [system_mipsel_linux,system_mips_linux] then
|
||||
if target_info.system in [system_mipsel_linux,system_mipseb_linux] then
|
||||
begin
|
||||
AsmWrite(#9'.ent'#9);
|
||||
if replaceforbidden then
|
||||
|
@ -171,6 +171,9 @@
|
||||
{$ifdef mipsel}
|
||||
{$define mips}
|
||||
{$endif mipsel}
|
||||
{$ifdef mipseb}
|
||||
{$define mips}
|
||||
{$endif mipseb}
|
||||
|
||||
{$ifdef mips}
|
||||
{$define cpu32bit}
|
||||
|
@ -296,7 +296,7 @@ unit cpugas;
|
||||
idtxt: 'AS';
|
||||
asmbin: 'as';
|
||||
asmcmd: '-mips2 -W -EB -o $OBJ $ASM';
|
||||
supported_targets: [system_mips_linux];
|
||||
supported_targets: [system_mipseb_linux];
|
||||
flags: [af_allowdirect, af_needar, af_smartlink_sections];
|
||||
labelprefix: '.L';
|
||||
comment: '# ';
|
||||
@ -307,6 +307,6 @@ begin
|
||||
{$ifdef MIPSEL}
|
||||
RegisterAssembler(as_MIPSEL_as_info, TMIPSGNUAssembler);
|
||||
{$else MIPSEL}
|
||||
RegisterAssembler(as_MIPS_as_info, TMIPSGNUAssembler);
|
||||
RegisterAssembler(as_MIPSEB_as_info, TMIPSGNUAssembler);
|
||||
{$endif MIPSEL}
|
||||
end.
|
||||
|
@ -2765,7 +2765,7 @@ begin
|
||||
|
||||
{ these cpus have an inline sar implementaion }
|
||||
{ currently, all supported CPUs have an internal sar implementation }
|
||||
{ $if defined(x86) or defined(arm) or defined(powerpc) or defined(powerpc64) or defined(sparc) or defined(mips) or defined(mipsel)}
|
||||
{ $if defined(x86) or defined(arm) or defined(powerpc) or defined(powerpc64) or defined(sparc) or defined(mips)}
|
||||
def_system_macro('FPC_HAS_INTERNAL_SAR');
|
||||
{ $endif}
|
||||
|
||||
@ -2882,33 +2882,31 @@ begin
|
||||
{$endif jvm}
|
||||
|
||||
{$ifdef mipsel}
|
||||
|
||||
// HIGHLY TENTATIVE, from David Zhang's options.pas. MarkMLl.
|
||||
//def_system_macro('CPUMIPS');
|
||||
//def_system_macro('CPUMIPS32');
|
||||
def_system_macro('CPUMIPS');
|
||||
def_system_macro('CPUMIPS32');
|
||||
def_system_macro('CPUMIPSEL');
|
||||
def_system_macro('CPUMIPSEL32');
|
||||
def_system_macro('CPU32');
|
||||
// def_system_macro('FPC_HAS_TYPE_DOUBLE');
|
||||
// def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
// def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
|
||||
def_system_macro('FPC_HAS_TYPE_DOUBLE');
|
||||
def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
|
||||
def_system_macro('FPC_CURRENCY_IS_INT64');
|
||||
def_system_macro('FPC_COMP_IS_INT64');
|
||||
// def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
|
||||
{$else not mipsel}
|
||||
{$ifdef mips}
|
||||
def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
|
||||
{$endif mipsel}
|
||||
|
||||
// HIGHLY TENTATIVE, from David Zhang's options.pas. MarkMLl.
|
||||
{$ifdef mipseb}
|
||||
def_system_macro('CPUMIPS');
|
||||
def_system_macro('CPUMIPS32');
|
||||
def_system_macro('CPUMIPSEB');
|
||||
def_system_macro('CPUMIPSEB32');
|
||||
def_system_macro('CPU32');
|
||||
// def_system_macro('FPC_HAS_TYPE_DOUBLE');
|
||||
// def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
// def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
|
||||
def_system_macro('FPC_HAS_TYPE_DOUBLE');
|
||||
def_system_macro('FPC_HAS_TYPE_SINGLE');
|
||||
def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
|
||||
def_system_macro('FPC_CURRENCY_IS_INT64');
|
||||
def_system_macro('FPC_COMP_IS_INT64');
|
||||
// def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
|
||||
{$endif}
|
||||
def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
|
||||
{$endif}
|
||||
|
||||
{ read configuration file }
|
||||
|
@ -178,7 +178,7 @@ const
|
||||
{ 6 } 32 {'vis'},
|
||||
{ 7 } 64 {'ia64'},
|
||||
{ 8 } 64 {'x86_64'},
|
||||
{ 9 } 32 {'mips'},
|
||||
{ 9 } 32 {'mipseb'},
|
||||
{ 10 } 32 {'arm'},
|
||||
{ 11 } 64 {'powerpc64'},
|
||||
{ 12 } 16 {'avr'},
|
||||
@ -196,7 +196,7 @@ const
|
||||
{ 6 } 32 {'vis'},
|
||||
{ 7 } 64 {'ia64'},
|
||||
{ 8 } 64 {'x86_64'},
|
||||
{ 9 } 32 {'mips'},
|
||||
{ 9 } 32 {'mipseb'},
|
||||
{ 10 } 32 {'arm'},
|
||||
{ 11 } 64 {'powerpc64'},
|
||||
{ 12 } 8 {'avr'},
|
||||
|
@ -1364,7 +1364,7 @@ implementation
|
||||
include(current_procinfo.flags,pi_is_assembler);
|
||||
p:=_asm_statement;
|
||||
|
||||
{$if not(defined(sparc)) and not(defined(arm)) and not(defined(avr)) and not(defined(mips)) and not(defined(mipsel))}
|
||||
{$if not(defined(sparc)) and not(defined(arm)) and not(defined(avr)) and not(defined(mips))}
|
||||
if (po_assembler in current_procinfo.procdef.procoptions) then
|
||||
begin
|
||||
{ set the framepointer to esp for assembler functions when the
|
||||
|
@ -43,7 +43,7 @@
|
||||
cpu_vm, { 6 }
|
||||
cpu_iA64, { 7 }
|
||||
cpu_x86_64, { 8 }
|
||||
cpu_mips, { 9 }
|
||||
cpu_mipseb, { 9 }
|
||||
cpu_arm, { 10 }
|
||||
cpu_powerpc64, { 11 }
|
||||
cpu_avr, { 12 }
|
||||
@ -143,7 +143,7 @@
|
||||
system_i386_haiku, { 63 }
|
||||
system_arm_darwin, { 64 }
|
||||
system_x86_64_solaris, { 65 }
|
||||
system_mips_linux, { 66 }
|
||||
system_mipseb_linux, { 66 }
|
||||
system_mipsel_linux, { 67 }
|
||||
system_i386_nativent, { 68 }
|
||||
system_i386_iphonesim, { 69 }
|
||||
|
@ -217,7 +217,7 @@ interface
|
||||
systems_wince = [system_arm_wince,system_i386_wince];
|
||||
systems_linux = [system_i386_linux,system_x86_64_linux,system_powerpc_linux,system_powerpc64_linux,
|
||||
system_arm_linux,system_sparc_linux,system_alpha_linux,system_m68k_linux,
|
||||
system_x86_6432_linux,system_mips_linux,system_mipsel_linux];
|
||||
system_x86_6432_linux,system_mipseb_linux,system_mipsel_linux];
|
||||
systems_freebsd = [system_i386_freebsd,
|
||||
system_x86_64_freebsd];
|
||||
systems_netbsd = [system_i386_netbsd,
|
||||
@ -357,7 +357,7 @@ interface
|
||||
|
||||
cpu2str : array[TSystemCpu] of string[10] =
|
||||
('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
|
||||
'mips','arm', 'powerpc64', 'avr', 'mipsel','jvm');
|
||||
'mipseb','arm', 'powerpc64', 'avr', 'mipsel','jvm');
|
||||
|
||||
abi2str : array[tabi] of string[10] =
|
||||
('DEFAULT','SYSV','AIX','EABI','ARMEB','EABIHF');
|
||||
@ -921,7 +921,7 @@ begin
|
||||
{$ifdef mipsel}
|
||||
default_target(system_mipsel_linux);
|
||||
{$else mipsel}
|
||||
default_target(system_mips_linux);
|
||||
default_target(system_mipseb_linux);
|
||||
{$endif mipsel}
|
||||
{$endif mips}
|
||||
|
||||
|
@ -792,15 +792,15 @@ unit i_linux;
|
||||
{$endif FPC_ARMEL}
|
||||
{$endif FPC_ARMHF}
|
||||
|
||||
system_mips_linux_info : tsysteminfo =
|
||||
system_mipseb_linux_info : tsysteminfo =
|
||||
(
|
||||
system : system_mips_LINUX;
|
||||
name : 'Linux for MIPS';
|
||||
system : system_mipseb_LINUX;
|
||||
name : 'Linux for MIPSEB';
|
||||
shortname : 'Linux';
|
||||
flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
|
||||
tf_requires_proper_alignment,
|
||||
tf_smartlink_sections,tf_smartlink_library,tf_has_winlike_resources];
|
||||
cpu : cpu_mips;
|
||||
cpu : cpu_mipseb;
|
||||
unit_env : 'LINUXUNITS';
|
||||
extradefines : 'UNIX;HASUNIX;CPUMIPS32';
|
||||
exeext : '';
|
||||
@ -968,7 +968,7 @@ initialization
|
||||
{$endif CPUARM}
|
||||
{$ifdef CPUMIPS}
|
||||
{$ifdef linux}
|
||||
set_source_info(system_mips_linux_info);
|
||||
set_source_info(system_mipseb_linux_info);
|
||||
{$endif linux}
|
||||
{$endif CPUMIPS}
|
||||
{$ifdef CPUMIPSEL}
|
||||
|
@ -138,8 +138,11 @@ const
|
||||
{$ifdef arm} platform_select='';{$endif} {unknown :( }
|
||||
{$ifdef m68k} platform_select='';{$endif} {unknown :( }
|
||||
{$ifdef mips}
|
||||
{$ifdef mipsel} platform_select='-EL';{$else}
|
||||
platform_select='-EB';{$endif}
|
||||
{$ifdef mipsel}
|
||||
platform_select='-EL';
|
||||
{$else}
|
||||
platform_select='-EB';
|
||||
{$endif}
|
||||
{$endif}
|
||||
|
||||
|
||||
@ -1182,10 +1185,10 @@ initialization
|
||||
RegisterExport(system_mipsel_linux,texportliblinux);
|
||||
RegisterTarget(system_mipsel_linux_info);
|
||||
{$else MIPS}
|
||||
RegisterExternalLinker(system_mips_linux_info,TLinkerLinux);
|
||||
RegisterImport(system_mips_linux,timportliblinux);
|
||||
RegisterExport(system_mips_linux,texportliblinux);
|
||||
RegisterTarget(system_mips_linux_info);
|
||||
RegisterExternalLinker(system_mipseb_linux_info,TLinkerLinux);
|
||||
RegisterImport(system_mipseb_linux,timportliblinux);
|
||||
RegisterExport(system_mipseb_linux,texportliblinux);
|
||||
RegisterTarget(system_mipseb_linux_info);
|
||||
{$endif MIPSEL}
|
||||
{$endif MIPS}
|
||||
RegisterRes(res_elf_info,TWinLikeResourceFile);
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/04/25]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mips-linux mipsel-linux jvm-java jvm-android
|
||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii powerpc-aix sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-netbsd x86_64-solaris x86_64-openbsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded powerpc64-aix avr-embedded armeb-linux armeb-embedded mipseb-linux mipsel-linux jvm-java jvm-android
|
||||
BSDs = freebsd netbsd openbsd darwin
|
||||
UNIXs = linux $(BSDs) solaris qnx haiku aix
|
||||
LIMIT83fs = go32v2 os2 emx watcom
|
||||
@ -492,7 +492,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst mkarmins mkx86ins
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mips-linux)
|
||||
ifeq ($(FULL_TARGET),mipseb-linux)
|
||||
override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove fpcsubst mkarmins mkx86ins
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
@ -702,7 +702,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override CLEAN_UNITS+=ppu crc usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mips-linux)
|
||||
ifeq ($(FULL_TARGET),mipseb-linux)
|
||||
override CLEAN_UNITS+=ppu crc usubst
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
@ -913,7 +913,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mips-linux)
|
||||
ifeq ($(FULL_TARGET),mipseb-linux)
|
||||
override COMPILER_UNITDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
@ -1123,7 +1123,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mips-linux)
|
||||
ifeq ($(FULL_TARGET),mipseb-linux)
|
||||
override COMPILER_SOURCEDIR+=..
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
@ -1946,7 +1946,7 @@ endif
|
||||
ifeq ($(FULL_TARGET),armeb-embedded)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mips-linux)
|
||||
ifeq ($(FULL_TARGET),mipseb-linux)
|
||||
REQUIRE_PACKAGES_RTL=1
|
||||
endif
|
||||
ifeq ($(FULL_TARGET),mipsel-linux)
|
||||
|
@ -201,8 +201,8 @@ program fpc;
|
||||
cpusuffix:='386'
|
||||
else if processorstr='m68k' then
|
||||
cpusuffix:='68k'
|
||||
else if processorstr='mips' then
|
||||
cpusuffix:='mips'
|
||||
else if processorstr='mipseb' then
|
||||
cpusuffix:='mipseb'
|
||||
else if processorstr='mipsel' then
|
||||
cpusuffix:='mipsel'
|
||||
else if processorstr='powerpc' then
|
||||
|
@ -67,7 +67,7 @@ const
|
||||
{ 6 } 'vis',
|
||||
{ 7 } 'ia64',
|
||||
{ 8 } 'x86_64',
|
||||
{ 9 } 'mips',
|
||||
{ 9 } 'mipseb',
|
||||
{ 10 } 'arm',
|
||||
{ 11 } 'powerpc64',
|
||||
{ 12 } 'avr',
|
||||
|
@ -71,9 +71,9 @@ interface
|
||||
{$ifdef cpuarm}
|
||||
source_cpu_string = 'arm';
|
||||
{$endif cpuarm}
|
||||
{$ifdef cpumips}
|
||||
source_cpu_string = 'mips';
|
||||
{$endif cpumips}
|
||||
{$ifdef cpumipseb}
|
||||
source_cpu_string = 'mipseb';
|
||||
{$endif cpumipseb}
|
||||
{$ifdef cpumipsel}
|
||||
source_cpu_string = 'mipsel';
|
||||
{$endif cpumipsel}
|
||||
|
Loading…
Reference in New Issue
Block a user