Skip to content

Commit

Permalink
Merge branch 'ks/hipe-ppc64' into dev
Browse files Browse the repository at this point in the history
* ks/hipe-ppc64:
  Enable HiPE by default when compiling for PPC64
  Translate RTL to PPC code on PPC64 too
  Changes in ppc files for PPC64
  Additions for the PPC64 backend
  Changes for the PPC64 backend
  Added loader for ppc64
  New files for the 64-bit backends
  Cleanup  tags

OTP-9198
  • Loading branch information
proxyles committed Apr 5, 2011
2 parents 645d19c + 577a628 commit 79698f6
Show file tree
Hide file tree
Showing 95 changed files with 1,115 additions and 793 deletions.
2 changes: 1 addition & 1 deletion erts/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2407,7 +2407,7 @@ if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then
fi
else
case "$ARCH-$OPSYS" in
x86-linux|amd64-linux|x86-darwin*|amd64-darwin*|ppc-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux)
x86-linux|amd64-linux|x86-darwin*|amd64-darwin*|ppc-linux|ppc64-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux)
enable_hipe=yes
;;
esac
Expand Down
11 changes: 7 additions & 4 deletions erts/emulator/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,12 @@ $(TTF_DIR)/beam_opcodes.h $(TTF_DIR)/beam_opcodes.c: $(OPCODE_TABLES) utils/beam
ATOMS= beam/atom.names
BIFS = beam/bif.tab
ifdef HIPE_ENABLED
HIPE_ARCH64_TAB=hipe/hipe_bif64.tab
HIPE_x86_TAB=hipe/hipe_x86.tab
HIPE_amd64_TAB=hipe/hipe_amd64.tab
HIPE_amd64_TAB=hipe/hipe_amd64.tab $(HIPE_ARCH64_TAB)
HIPE_ultrasparc_TAB=hipe/hipe_sparc.tab
HIPE_ppc_TAB=hipe/hipe_ppc.tab
HIPE_ppc64_TAB=hipe/hipe_ppc64.tab
HIPE_ppc64_TAB=hipe/hipe_ppc64.tab $(HIPE_ARCH64_TAB)
HIPE_arm_TAB=hipe/hipe_arm.tab
HIPE_ARCH_TAB=$(HIPE_$(ARCH)_TAB)
BIFS += hipe/hipe_bif0.tab hipe/hipe_bif1.tab hipe/hipe_bif2.tab $(HIPE_ARCH_TAB)
Expand Down Expand Up @@ -801,12 +802,14 @@ OS_OBJS += $(OBJDIR)/erl_mseg.o \
$(OBJDIR)/erl_mtrace_sys_wrap.o \
$(OBJDIR)/erl_sys_common_misc.o

HIPE_ARCH64_OBJS=$(OBJDIR)/hipe_bif64.o

HIPE_x86_OS_OBJS=$(HIPE_x86_$(OPSYS)_OBJS)
HIPE_x86_OBJS=$(OBJDIR)/hipe_x86.o $(OBJDIR)/hipe_x86_glue.o $(OBJDIR)/hipe_x86_bifs.o $(OBJDIR)/hipe_x86_signal.o $(OBJDIR)/hipe_x86_stack.o $(HIPE_x86_OS_OBJS)
HIPE_amd64_OBJS=$(OBJDIR)/hipe_amd64.o $(OBJDIR)/hipe_amd64_glue.o $(OBJDIR)/hipe_amd64_bifs.o $(OBJDIR)/hipe_x86_signal.o $(OBJDIR)/hipe_x86_stack.o
HIPE_amd64_OBJS=$(OBJDIR)/hipe_amd64.o $(OBJDIR)/hipe_amd64_glue.o $(OBJDIR)/hipe_amd64_bifs.o $(OBJDIR)/hipe_x86_signal.o $(OBJDIR)/hipe_x86_stack.o $(HIPE_ARCH64_OBJS)
HIPE_ultrasparc_OBJS=$(OBJDIR)/hipe_sparc.o $(OBJDIR)/hipe_sparc_glue.o $(OBJDIR)/hipe_sparc_bifs.o $(OBJDIR)/hipe_risc_stack.o
HIPE_ppc_OBJS=$(OBJDIR)/hipe_ppc.o $(OBJDIR)/hipe_ppc_glue.o $(OBJDIR)/hipe_ppc_bifs.o $(OBJDIR)/hipe_risc_stack.o
HIPE_ppc64_OBJS=$(HIPE_ppc_OBJS)
HIPE_ppc64_OBJS=$(HIPE_ppc_OBJS) $(HIPE_ARCH64_OBJS)
HIPE_arm_OBJS=$(OBJDIR)/hipe_arm.o $(OBJDIR)/hipe_arm_glue.o $(OBJDIR)/hipe_arm_bifs.o $(OBJDIR)/hipe_risc_stack.o
HIPE_noarch_OBJS=
HIPE_ARCH_OBJS=$(HIPE_$(ARCH)_OBJS)
Expand Down
2 changes: 1 addition & 1 deletion erts/emulator/hipe/hipe_abi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%CopyrightBegin%
%CopyrightEnd%

$Id$


HiPE ABI
========
Expand Down
54 changes: 7 additions & 47 deletions erts/emulator/hipe/hipe_amd64.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/* $Id$
*/


#include <stddef.h> /* offsetof() */
#ifdef HAVE_CONFIG_H
#include "config.h"
Expand Down Expand Up @@ -334,43 +334,3 @@ void hipe_arch_print_pcb(struct hipe_process_state *p)
U("narity ", narity);
#undef U
}

/*
* XXX: The following should really be moved to a generic hipe_bifs_64 file.
*/

#if 0 /* unused */
static int term_to_Sint64(Eterm term, Sint64 *sp)
{
return term_to_Sint(term, sp);
}

BIF_RETTYPE hipe_bifs_write_s64_2(BIF_ALIST_2)
{
Sint64 *address;
Sint64 value;

address = term_to_address(BIF_ARG_1);
if (!address || !hipe_word64_address_ok(address))
BIF_ERROR(BIF_P, BADARG);
if (!term_to_Sint64(BIF_ARG_2, &value))
BIF_ERROR(BIF_P, BADARG);
*address = value;
BIF_RET(NIL);
}
#endif

BIF_RETTYPE hipe_bifs_write_u64_2(BIF_ALIST_2)
{
Uint64 *address;
Uint64 value;

address = term_to_address(BIF_ARG_1);
if (!address || !hipe_word64_address_ok(address))
BIF_ERROR(BIF_P, BADARG);
if (!term_to_Uint(BIF_ARG_2, &value))
BIF_ERROR(BIF_P, BADARG);
*address = value;
hipe_flush_icache_word(address);
BIF_RET(NIL);
}
14 changes: 7 additions & 7 deletions erts/emulator/hipe/hipe_amd64.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/* $Id$
*/


#ifndef HIPE_AMD64_H
#define HIPE_AMD64_H

Expand Down
14 changes: 5 additions & 9 deletions erts/emulator/hipe/hipe_amd64.tab
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2004-2009. All Rights Reserved.
#
#
# Copyright Ericsson AB 2004-2011. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
#
# %CopyrightEnd%
#
# $Id$
# AMD64-specific atoms and bifs

atom amd64
atom handle_fp_exception
atom inc_stack_0
atom sse2_fnegate_mask

# bif hipe_bifs:write_s64/2
bif hipe_bifs:write_u64/2
2 changes: 1 addition & 1 deletion erts/emulator/hipe/hipe_amd64_abi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%CopyrightBegin%
%CopyrightEnd%

$Id$


HiPE AMD64 ABI
==============
Expand Down
7 changes: 3 additions & 4 deletions erts/emulator/hipe/hipe_amd64_asm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ changecom(`/*', `*/')dnl
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2010. All Rights Reserved.
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
Expand All @@ -17,9 +17,8 @@ changecom(`/*', `*/')dnl
*
* %CopyrightEnd%
*/
/*
* $Id$
*/


`#ifndef HIPE_AMD64_ASM_H
#define HIPE_AMD64_ASM_H'

Expand Down
6 changes: 2 additions & 4 deletions erts/emulator/hipe/hipe_amd64_bifs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ changecom(`/*', `*/')dnl
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2010. All Rights Reserved.
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
Expand All @@ -17,9 +17,7 @@ changecom(`/*', `*/')dnl
*
* %CopyrightEnd%
*/
/*
* $Id$
*/


include(`hipe/hipe_amd64_asm.m4')
#`include' "hipe_literals.h"
Expand Down
12 changes: 6 additions & 6 deletions erts/emulator/hipe/hipe_amd64_gc.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/* $Id$
/*
* Stack walking helpers for native stack GC procedures.
*/
#ifndef HIPE_AMD64_GC_H
Expand Down
6 changes: 2 additions & 4 deletions erts/emulator/hipe/hipe_amd64_glue.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2010. All Rights Reserved.
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
Expand All @@ -16,9 +16,7 @@
*
* %CopyrightEnd%
*/
/*
* $Id$
*/


#include "hipe_amd64_asm.h"
#include "hipe_literals.h"
Expand Down
15 changes: 7 additions & 8 deletions erts/emulator/hipe/hipe_amd64_glue.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2004-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2004-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/*
* $Id$
*/


#ifndef HIPE_AMD64_GLUE_H
#define HIPE_AMD64_GLUE_H

Expand Down
14 changes: 7 additions & 7 deletions erts/emulator/hipe/hipe_amd64_primops.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2005-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2005-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/* $Id$
*/


PRIMOP_LIST(am_inc_stack_0, &nbif_inc_stack_0)
PRIMOP_LIST(am_handle_fp_exception, &nbif_handle_fp_exception)
PRIMOP_LIST(am_sse2_fnegate_mask, &sse2_fnegate_mask)
14 changes: 7 additions & 7 deletions erts/emulator/hipe/hipe_arch.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2003-2009. All Rights Reserved.
*
*
* Copyright Ericsson AB 2003-2011. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
*
* %CopyrightEnd%
*/
/* $Id$
*/


#ifndef HIPE_ARCH_H
#define HIPE_ARCH_H

Expand Down
Loading

0 comments on commit 79698f6

Please sign in to comment.