(cosmetics)

This commit is contained in:
Lephenixnoir 2021-03-16 12:29:39 +01:00
parent 23809e40ef
commit 4c9b738247
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
5 changed files with 12 additions and 15 deletions

View File

@ -31,7 +31,7 @@ public:
Never=1,
/* Promote but keep the lower-level information */
Append=0,
/* Promove and hide the lower-level information */
/* Promote and hide the lower-level information */
Promote=2,
};

View File

@ -69,15 +69,15 @@ struct RelConst
/* The following fields concurrently indicate the base. The order of
resolution is as follows (non-trivial types in parentheses):
* If [spe] is equal to Bottom or Top, this is the value.
* If [arg] is non-zero, the value of the arg-th argument is used.
* If [org] is non-zero, the original value of the associated
callee-saved register is used. (CpuRegister)
* If [reg] is non-zero, the base is that register. (CpuRegister)
* If [spe] is equal to Bottom or Top, this is the value.
* If [arg] is non-zero, the value of the arg-th argument is used.
* If [org] is non-zero, the original value of the associated
callee-saved register is used. (CpuRegister)
* If [reg] is non-zero, the base is that register. (CpuRegister)
For efficiency, checking [base==0] will tell apart plain old
constants from values with bases (and specials but these are usually
handled first). */
For efficiency, checking [base==0] will tell apart plain old
constants from values with bases (and specials but these are usually
handled first). */
union {
struct {
uint8_t spe;

View File

@ -6,7 +6,7 @@
// Fatal errors (caught by main):
// std::logic_error Internal consistency, fxos is broken
// FxOS::LimitError fxos doesn't know how to handle the input
// FxOS::LangError Program is invalid or dabatase too poor
// FxOS::LangError Program is invalid or database too poor
//
// Recoverable errors:
// std::runtime_error External errors (fi. file access)

View File

@ -99,7 +99,7 @@ struct StructType: public BaseType
class DataType
{
public:
/* Variant identifier (think of it as a named sum type */
/* Variant identifier (think of it as a named sum type) */
enum DataKind { Integer=0, Bitfield=1, Array=2, String=3, Struct=4 };
DataKind kind() const noexcept;
@ -125,8 +125,7 @@ public:
DataType(StructType t): v(t) {}
private:
std::variant<IntegerType, BitfieldType, ArrayType, StringType,
StructType> v;
std::variant<IntegerType,BitfieldType,ArrayType,StringType,StructType> v;
};
//---

View File

@ -301,9 +301,7 @@ int load_asm(Buffer const &file, size_t start_offset, size_t start_line)
/* Finalize current instruction */
if(!mnemonic) err("%d: missing mnemonic", line);
/* TODO: Generate all parameters and fill */
Pattern p = make_pattern(code);
total += instantiate(p, mnemonic, argtoken1,argtoken2);
if(code) free(code);