-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--HG-- branch : release
- Loading branch information
Showing
38 changed files
with
1,067 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# release.yml | ||
# Copyright (C) 2020 Kaz Nishimura | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice and | ||
# this notice are preserved. This file is offered as-is, without any warranty. | ||
--- | ||
on: | ||
push: | ||
tags: | ||
- release/* | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Version ${{ github.ref }} | ||
body: | | ||
This is ... | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ config.h.in | |
configure | ||
aclocal.m4 | ||
stamp-* | ||
.dirstamp | ||
Debug | ||
Release | ||
.libs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
0b9aff908790e0dc941587209eb3a9ce1057004e release/2-alpha.1 | ||
bf7c62707dccb2d8bf7b84a625a3277920f137cd release/2-alpha.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.rej | ||
*.orig | ||
*~ |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// <bits/vm68k/internal/instruction.h> | ||
// Copyright (C) 2012-2020 Kaz Nishimura | ||
// | ||
// This program is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) | ||
// any later version. | ||
// | ||
// This program 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 General Public License for | ||
// more details. | ||
// | ||
// You should have received a copy of the GNU General Public License along with | ||
// this program. If not, see <http://www.gnu.org/licenses/>. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef _VM68K_INTERNAL_INSTRUCTION_H | ||
#define _VM68K_INTERNAL_INSTRUCTION_H 1 | ||
|
||
#include <bits/vm68k/internal/register.h> | ||
#include <vm68k/instruction> | ||
#include <memory> | ||
#include <utility> | ||
|
||
namespace vm68k | ||
{ | ||
/* | ||
* Runtime execution contexts. | ||
*/ | ||
class _VM68K_PUBLIC runtime_execution_context: public execution_context | ||
{ | ||
private: | ||
std::shared_ptr<memory_map> _memory; | ||
|
||
private: | ||
runtime_register_file _registers; | ||
|
||
private: | ||
long_word _pc; | ||
|
||
public: | ||
runtime_execution_context(const std::shared_ptr<memory_map> &memory, | ||
long_word pc); | ||
|
||
runtime_execution_context(std::shared_ptr<memory_map> &&memory, | ||
long_word pc); | ||
|
||
public: | ||
virtual ~runtime_execution_context(); | ||
|
||
public: | ||
auto memory() const -> std::shared_ptr<memory_map> final override | ||
{ | ||
return _memory; | ||
} | ||
|
||
public: | ||
register_file ®isters() final override | ||
{ | ||
return _registers; | ||
} | ||
|
||
public: | ||
long_word pc() const override; | ||
|
||
public: | ||
void set_pc(long_word pc) override; | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
// <bits/vm68k/register.h> | ||
// Copyright (C) 2020 Kaz Nishimura | ||
// | ||
// This program is free software: you can redistribute it and/or modify it | ||
// under the terms of the GNU General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) | ||
// any later version. | ||
// | ||
// This program 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 General Public License for | ||
// more details. | ||
// | ||
// You should have received a copy of the GNU General Public License along with | ||
// this program. If not, see <http://www.gnu.org/licenses/>. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef _VM68K_INTERNAL_REGISTER_H | ||
#define _VM68K_INTERNAL_REGISTER_H 1 | ||
|
||
#include <vm68k/register> | ||
#include <bits/vm68kcore.h> | ||
#include <array> | ||
#include <utility> | ||
#include <cstdint> | ||
|
||
namespace vm68k | ||
{ | ||
/** | ||
* Data registers. | ||
*/ | ||
class _VM68K_PUBLIC data_register | ||
{ | ||
private: | ||
long_word _value; | ||
|
||
public: | ||
data_register &operator =(const long_word value) | ||
{ | ||
_value = value; | ||
return *this; | ||
} | ||
|
||
data_register &operator =(const word value) | ||
{ | ||
auto preserved = _value.to_uint() & 0xffff0000U; | ||
_value = long_word(preserved | value.to_uint()); | ||
return *this; | ||
} | ||
|
||
data_register &operator =(const byte value) | ||
{ | ||
auto preserved = _value.to_uint() & 0xffffff00U; | ||
_value = long_word(preserved | value.to_uint()); | ||
return *this; | ||
} | ||
|
||
public: | ||
operator long_word() const noexcept | ||
{ | ||
return _value; | ||
} | ||
}; | ||
|
||
/** | ||
* Address registers. | ||
*/ | ||
class _VM68K_PUBLIC address_register | ||
{ | ||
private: | ||
long_word _value; | ||
|
||
public: | ||
address_register &operator =(const long_word value) | ||
{ | ||
_value = value; | ||
return *this; | ||
} | ||
|
||
public: | ||
operator long_word() const noexcept | ||
{ | ||
return _value; | ||
} | ||
}; | ||
|
||
class _VM68K_PUBLIC runtime_register_file: public register_file | ||
{ | ||
private: | ||
// Array of the data registers. | ||
std::array<data_register, D_REGISTER_MAX> _d; | ||
|
||
// Array of the address registers. | ||
std::array<address_register, A_REGISTER_MAX> _a; | ||
|
||
public: | ||
runtime_register_file(); | ||
|
||
runtime_register_file(const runtime_register_file &other); | ||
|
||
runtime_register_file(runtime_register_file &&other); | ||
|
||
public: | ||
virtual ~runtime_register_file(); | ||
|
||
public: | ||
long_word d(std::size_t regno) const override; | ||
|
||
void set_d(std::size_t regno, long_word value) override; | ||
|
||
void set_d(std::size_t regno, word value) override; | ||
|
||
void set_d(std::size_t regno, byte) override; | ||
|
||
public: | ||
long_word a(std::size_t regno) const override; | ||
|
||
void set_a(std::size_t regno, long_word value) override; | ||
}; | ||
} | ||
|
||
#endif |
Oops, something went wrong.