Commit 61766fe9 authored by Richard Henderson's avatar Richard Henderson
Browse files

target-hppa: Add framework and enable compilation



This is just about the minimum required to enable compilation
without actually executing any instructions.  This contains the
HPPACPU structure and the required callbacks, the gdbstub, the
basic translation loop, and a translate_one function that always
results in an illegal instruction.

Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
parent 005fa38d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ F: include/hw/cris/
F: tests/tcg/cris/
F: disas/cris.c

HPPA (PA-RISC)
M: Richard Henderson <rth@twiddle.net>
S: Maintained
F: target/hppa/
F: disas/hppa.c

LM32
M: Michael Walle <michael@walle.cc>
S: Maintained
+3 −3
Original line number Diff line number Diff line
@@ -510,8 +510,6 @@ elif check_define __arm__ ; then
  cpu="arm"
elif check_define __aarch64__ ; then
  cpu="aarch64"
elif check_define __hppa__ ; then
  cpu="hppa"
else
  cpu=$(uname -m)
fi
@@ -5847,7 +5845,7 @@ target_name=$(echo $target | cut -d '-' -f 1)
target_bigendian="no"

case "$target_name" in
  armeb|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
  armeb|hppa|lm32|m68k|microblaze|mips|mipsn32|mips64|moxie|or32|ppc|ppcemb|ppc64|ppc64abi32|s390x|sh4eb|sparc|sparc64|sparc32plus|xtensaeb)
  target_bigendian=yes
  ;;
esac
@@ -5910,6 +5908,8 @@ case "$target_name" in
  ;;
  cris)
  ;;
  hppa)
  ;;
  lm32)
  ;;
  m68k)
+1 −0
Original line number Diff line number Diff line
# Default configuration for hppa-linux-user
+1 −0
Original line number Diff line number Diff line
obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o

target/hppa/cpu-qom.h

0 → 100644
+52 −0
Original line number Diff line number Diff line
/*
 * QEMU HPPA CPU
 *
 * Copyright (c) 2016 Richard Henderson <rth@twiddle.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see
 * <http://www.gnu.org/licenses/lgpl-2.1.html>
 */
#ifndef QEMU_HPPA_CPU_QOM_H
#define QEMU_HPPA_CPU_QOM_H

#include "qom/cpu.h"

#define TYPE_HPPA_CPU "hppa-cpu"

#define HPPA_CPU_CLASS(klass) \
    OBJECT_CLASS_CHECK(HPPACPUClass, (klass), TYPE_HPPA_CPU)
#define HPPA_CPU(obj) \
    OBJECT_CHECK(HPPACPU, (obj), TYPE_HPPA_CPU)
#define HPPA_CPU_GET_CLASS(obj) \
    OBJECT_GET_CLASS(HPPACPUClass, (obj), TYPE_HPPA_CPU)

/**
 * HPPACPUClass:
 * @parent_realize: The parent class' realize handler.
 * @parent_reset: The parent class' reset handler.
 *
 * An HPPA CPU model.
 */
typedef struct HPPACPUClass {
    /*< private >*/
    CPUClass parent_class;
    /*< public >*/

    DeviceRealize parent_realize;
    void (*parent_reset)(CPUState *cpu);
} HPPACPUClass;

typedef struct HPPACPU HPPACPU;

#endif
Loading