summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibX86
AgeCommit message (Collapse)Author
2021-12-23LibX86: Mark two InstructionDescriptor functions as constHendiadyoin1
Thanks clang-tidy
2021-10-25LibX86: Take load base address into consideration during disassemblyDaniel Bertalan
Since our executables are position-independent, the address values extraced from processes don't correspond to their values within the ELF file. We have to offset the absolute addresses by the load base address to get the relative symbol that we need for disassembly.
2021-10-17LibX86: Add SSE supportHediadyoin1
This only adds the decodeing support for SSE, not SSE2, etc. may contain traces of SSE2.
2021-09-16LibX86: Use default instead of an empty constructor/destructorBrian Gianforcaro
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
2021-08-02LibX86: Stub out Disassembler::next() for x86_64Gunnar Beutner
LibX86 doesn't currently support x86_64 opcodes which causes Profiler to crash when clicking on any symbol in the call graph.
2021-08-01Libraries: Remove unused header includesBrian Gianforcaro
2021-07-22LibX86: Add missing MovD and MovQ instructionsHendiadyoin1
These are placeholders for now
2021-07-22LibX86: Use names closer to the spec for the ModrmHendiadyoin1
This gets rid of a lot of magic number shifts and ands.
2021-07-20LibX86: Add INT1 instruction (needed for disassembly)Andreas Kling
2021-06-30Debugger: Compile on x86_64Hendiadyoin1
This is not guaranteed to work at all
2021-06-11AK+LibX86: Generalize u128/256 to AK::UFixedBigIntHendiadyoin1
Doing these as custom classes might be faster, especially when writing them in SSE, but this would cause a lot of Code duplication and due to the nature of constexprs and the intelligence of the compiler they might be using SSE/MMX either way
2021-05-31LibX86: Replace fprintf(stderr) with warnln()Linus Groh
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-07LibX86: Convert StringBuilder::appendf() => AK::FormatAndreas Kling
2021-05-01LibX86+UserspaceEmulator: Add MMX insns prototypesHendiadyoin1
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-23UE+LibX86: Support bigger reads and writesHendiadyoin1
2021-04-23LibX86: Add basic u128 and u256 constainersHendiadyoin1
These support all bitwise operations
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-21LibX86: Convert String::format() => String::formatted()Andreas Kling
2021-04-15Everything: Add `-Wnon-virtual-dtor` flagNicholas-Baron
This flag warns on classes which have `virtual` functions but do not have a `virtual` destructor. This patch adds both the flag and missing destructors. The access level of the destructors was determined by a two rules of thumb: 1. A destructor should have a similar or lower access level to that of a constructor. 2. Having a `private` destructor implicitly deletes the default constructor, which is probably undesirable for "interface" types (classes with only virtual functions and no data). In short, most of the added destructors are `protected`, unless the compiler complained about access.
2021-04-10AK+Everywhere: Make StdLibExtras templates less wrapper-yAnotherTest
This commit makes the user-facing StdLibExtras templates and utilities arguably more nice-looking by removing the need to reach into the wrapper structs generated by them to get the value/type needed. The C++ standard library had to invent `_v` and `_t` variants (likely because of backwards compat), but we don't need to cater to any codebase except our own, so might as well have good things for free. :^)
2021-03-09LibX86: Don't use "if (foo) [[unlikely]] { }" for now (to please clang)Andreas Kling
2021-03-09UserspaceEmulator+LibX86: Sprinkle some [[unlikely]] and ALWAYS_INLINEAndreas Kling
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-02LibX86: Don't assert just because insn has no immediate bytesAndreas Kling
It's perfectly fine to not have immediate bytes. Many insns don't :^)
2021-01-31LibX86: sanity check for Instruction read sizeThomas Mangin
During "Emulator hacking: Let's make the userspace emulator go faster!", the switch implented in read() was inlined (toward the end of the video). This patch restore the assert check for any read other than 8, 16 or 32 bits was lost during the code conversion.
2021-01-22Libraries: Add missing headersBen Wiederhake
A C++ source file containing just #include <LibFoo/Bar.h> should always compile cleanly. This patch adds missing header inclusions that could have caused weird error messages if they were used in a different context. Also, this confused QtCreator.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling