clang-format and other minor changes
This commit is contained in:
parent
a399ed31d7
commit
97029d4f3e
|
@ -32,7 +32,6 @@ namespace FxOS {
|
|||
|
||||
struct MemoryArea
|
||||
{
|
||||
public:
|
||||
/* Userspace seen from user and privileged mode */
|
||||
static MemoryArea U0, P0;
|
||||
/* Second half of memory, only for privileged mode */
|
||||
|
@ -98,7 +97,7 @@ struct MemoryRegion
|
|||
/* Returns the size of the region */
|
||||
uint32_t size() const noexcept;
|
||||
|
||||
/* Returns the area associated to the region (assuming it is fully
|
||||
/* Returns the area associated with the region (assuming it is fully
|
||||
contained in one, which should always be the case) */
|
||||
MemoryArea area() const noexcept;
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ class OS
|
|||
{
|
||||
public:
|
||||
/* Create an OS interface for this virtual space. If there is no data
|
||||
loaded in ROM or the OS can't be identified, the type os OS is set to
|
||||
UNKNOWN and no information is provided. */
|
||||
loaded in ROM or the OS can't be identified, the type os OS is set to
|
||||
UNKNOWN and no information is provided. */
|
||||
OS(VirtualSpace &space);
|
||||
|
||||
/* Type of OS, determined at construction */
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
namespace FxOS {
|
||||
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
// 0110 |_ 3.50 -> 3.60 | _\ \ / _ (_-< //
|
||||
// |_ base# + offset |_| /_\_\___/__/ //
|
||||
//---------------------------------------------------------------------------//
|
||||
// fxos/util/Queue: Simple queue that handles recursivity
|
||||
// fxos/util/Queue: Simple queue that handles recursion
|
||||
//
|
||||
// Can be instantiated for any T for which std::set<T> is valid and properly
|
||||
// checks objects' identity.
|
||||
//---
|
||||
|
||||
#ifndef FXOS_UTIL_QUEUE_H
|
||||
|
|
|
@ -288,6 +288,7 @@ bool AsmInstruction::isdelayed() const noexcept
|
|||
|
||||
bool AsmInstruction::isvaliddelayslot() const noexcept
|
||||
{
|
||||
// TODO: PC-relative move is a valid delay slot but it doesn't work
|
||||
return !isdelayed() && !isterminal() && !isjump() && !iscondjump()
|
||||
&& strcmp(this->mnemonic, "mova") != 0;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ static _e_args parse_e(Session &session, Parser &parser)
|
|||
if(!args.space_name.empty()) {
|
||||
space = session.get_space(args.space_name);
|
||||
if(!space) {
|
||||
std::string msg =
|
||||
format("virtual space '%s' does not exist", args.space_name);
|
||||
std::string msg
|
||||
= format("virtual space '%s' does not exist", args.space_name);
|
||||
if(parser.completing())
|
||||
throw Parser::CompletionRequest("_error", msg);
|
||||
else
|
||||
|
|
|
@ -249,12 +249,12 @@ std::variant<long, Range> Parser::expr_or_range(VirtualSpace *space)
|
|||
if(m_la.type == ':') {
|
||||
expect(':');
|
||||
long length = expr(space);
|
||||
return (Range){start, start + length};
|
||||
return (Range) {start, start + length};
|
||||
}
|
||||
else if(m_la.type == '.') {
|
||||
expect('.');
|
||||
long end = expr(space);
|
||||
return (Range){start, end};
|
||||
return (Range) {start, end};
|
||||
}
|
||||
else {
|
||||
return (long)start;
|
||||
|
|
Loading…
Reference in New Issue