Andreas Kling
76b9fb258d
UserspaceEmulator: Convert the XOR instruction to inline assembly
2020-07-11 16:02:25 +02:00
Andreas Kling
9db588daf1
UserspaceEmulator: Convert the SUB instruction to inline assembly
2020-07-11 15:52:53 +02:00
Andreas Kling
7d41b95071
UserspaceEmulator: Tweak INC and SAR helpers to not be SoftCPU members
...
It's quite nice having these as compartmentalized free functions.
2020-07-11 15:47:53 +02:00
Andreas Kling
e852768ba6
UserspaceEmulator: Add the INC and ADD instructions
...
More inline assembly. I'm still figuring out how to combine templates
and inline assembly, but it's turning out pretty cool. :^)
2020-07-11 14:20:08 +02:00
Andreas Kling
12ab46def9
UserspaceEmulator: Give SoftCPU an API for evaluating jump conditions
...
There are 16 conditions and they're all based on a combination of the
CPU flags.
2020-07-11 13:45:39 +02:00
Andreas Kling
133803b8a7
UserspaceEmulator: Split SAR inline assembly into 8/16/32 bit variants
2020-07-11 13:43:27 +02:00
Andreas Kling
743d4ccb8f
UserspaceEmulator: Support MOV_RM32_reg32 with memory destination
2020-07-11 13:29:05 +02:00
Andreas Kling
e5afe6a579
UserspaceEmulator: Implement the CMP family of instructions
...
These are identical to SUB, except they don't store the result (they
only upate the arithmetic flags.)
2020-07-11 13:27:40 +02:00
Tom
8d5fde440a
FileManager: Specify "Open in Text Editor" action as default in context menu
...
Since double-clicking the item would trigger the "Open in Text Editor"
action, specify it as the default action when displaying the
context menu.
2020-07-11 11:45:49 +02:00
Tom
1c1ab71692
WindowServer/LibGUI: Add default menu items and allow default action for context menu
...
By specifying an optional Action for Menu::popup an application
can specify what item should be displayed as a default item.
2020-07-11 11:45:49 +02:00
Tom
fc4e01a3c9
WindowServer: Add support for default MenuItem
...
This allows marking a MenuItem as a default action, e.g. in a
context menu for an action that reflects what e.g. a double click
would perform.
Also enhance the window menu to mark the close action as the
default, and when double clicked perform that action.
Fixes #1289
2020-07-11 11:45:49 +02:00
AnotherTest
684b04e02a
WebServer: Allow the user to specify the base directory
...
This commit makes the WebServer accept a base path to serve.
This makes taking files out of the system significantly more simple
(depending on whom you ask).
2020-07-11 11:36:12 +02:00
Kevin Meyer
7b5ffe67cf
LibWeb: Check if layout node is still present after dispatch_event
...
Fixes https://github.com/SerenityOS/serenity/issues/2638
Dispatching an event can change the document. Therefore another check
for the layout_root needs to be done.
2020-07-11 11:34:59 +02:00
Kevin Meyer
821043d798
LibWeb: Remove some unnecessary casts
2020-07-11 11:34:59 +02:00
Kevin Meyer
d5d732cc87
LibWeb: Fix EVENT_DEBUG dump compilation
2020-07-11 11:34:59 +02:00
Nico Weber
97aaf95265
FontEditor: Add a "Save" menu item
2020-07-11 11:34:38 +02:00
Nico Weber
315dc8d81b
FontEditor: Add a "Save as..." menu item
2020-07-11 11:34:38 +02:00
Nico Weber
03e722f664
FontEditor: Add an "Open..." menu item
2020-07-11 11:34:38 +02:00
Peter Elliott
7a27fa3df8
LibC: Implement tcflush(3)
2020-07-11 11:33:33 +02:00
Andreas Kling
f4ddca0a73
UserspaceEmulator: Warn in SoftMMU if accessing unknown memory
2020-07-10 20:29:44 +02:00
Andreas Kling
58fd010caf
UserspaceEmulator: Implement a bunch of the MOV instructions
2020-07-10 20:29:14 +02:00
Andreas Kling
04d58f54b3
UserspaceEmulator: Implement the SAR instruction
...
Let's try doing this with some inline assembly. We know we're running
on an x86 target anyway. :^)
2020-07-10 20:20:27 +02:00
Andreas Kling
3899effb19
UserspaceEmulator: Implement the SUB family of instructions
2020-07-10 20:20:27 +02:00
Andreas Kling
0cf7fd5268
UserspaceEmulator+LibX86: Implement all the forms of XOR
...
And they're all generic, which will make it easy to support more ops.
2020-07-10 20:20:27 +02:00
Andreas Kling
9955819d92
UserspaceEmulator: Better 8/16 bit GPR accessors
2020-07-10 20:20:27 +02:00
Andreas Kling
6f27770cea
UserspaceEmulator: Add 8/16 bit memory read/write operations
2020-07-10 20:20:27 +02:00
Andreas Kling
f8b38eabeb
UserspaceEmulator: First cut of generic instruction implementations
...
Let's use C++ templates to implement the generic parts of instructions.
There are tons of them with the same set of inputs, just different
behavior. Templates are perfect for this.
2020-07-10 20:20:27 +02:00
Andreas Kling
30ef30ca09
UserspaceEmulator: Add proper segment registers
...
Some things will flow better if we're able to index into a table of our
segment registers.
2020-07-10 20:20:27 +02:00
Andreas Kling
4f41fada39
UserspaceEmulator: Add accessors for the 16-bit GPRs
2020-07-10 20:20:27 +02:00
Andreas Kling
45bfdd0063
LibX86: Add a templatized way to resolve ModR/M memory references
...
Hopefully this will be flexible enough for our SoftCPU. :^)
2020-07-10 20:20:27 +02:00
Andreas Kling
3a1cf9505d
LibX86: Store Instruction's segment prefix as Optional<SegmentRegister>
...
Instead of having a dedicated enum value for the empty state.
2020-07-10 20:20:27 +02:00
Andreas Kling
f1801cfb28
UserspaceEmulator: Fix a Clang warning
...
Clang didn't like default construction of PartAddressableRegister,
so let's just use memset() then.
2020-07-10 20:20:27 +02:00
thankyouverycool
deceb91c48
FileManager: Show an open folder icon for the selected directory
...
The currently selected directory now displays an open folder icon
in the directory tree.
2020-07-10 19:44:18 +02:00
thankyouverycool
e6ddc7e022
LibGUI: Add missing on_toggle hook to TreeView
...
Alt+arrow toggles are now captured.
2020-07-10 19:44:18 +02:00
thankyouverycool
bd0a4cbbf9
Base: Update 16x16 filetype-folder icons
...
Update folder-open icon to match current folder icon, and shift
the current folder icon right 1 pixel for smoove animation.
2020-07-10 19:44:18 +02:00
Matthew Olsson
119386ffb0
LibJS: Add tests for symbol object integration
2020-07-09 23:33:00 +02:00
Matthew Olsson
7a1d485b19
LibJS: Integrate Symbols into objects as valid keys
...
This allows objects properties to be created for symbol keys in addition
to just plain strings/numbers
2020-07-09 23:33:00 +02:00
Matthew Olsson
9783a4936c
LibJS: Add test for well-known symbols
2020-07-09 23:29:28 +02:00
Matthew Olsson
ffb569fd5d
LibJS: Uncomment remaining symbol tests
2020-07-09 23:29:28 +02:00
Matthew Olsson
d9db6bec42
LibJS: Move global symbol map from SymbolObject to Interpreter
...
This allows different instances of the Interpreter to have their own
global symbols. Also makes Symbol non-copyable and non-moveable.
2020-07-09 23:29:28 +02:00
Andreas Kling
4d8683b632
UserspaceEmulator: Tidy up SoftCPU's general purpose registers
...
This patch adds a PartAddressableRegister type, which divides a 32-bit
value into separate parts needed for the EAX/AX/AL/AH register splits.
Clean up the code around register access to make it a little less
cumbersome to use.
2020-07-09 23:27:50 +02:00
Tom
b02d33bd63
Kernel: Fix some flaws that caused crashes or hangs during boot
...
We need to halt the BSP briefly until all APs are ready for the
first context switch, but we can't hold the same spinlock by all
of them while doing so. So, while the APs are waiting on each other
they need to release the scheduler lock, and then once signaled
re-acquire it. Should solve some timing dependent hangs or crashes,
most easily observed using qemu with kvm disabled.
2020-07-09 23:24:55 +02:00
Tom
5d9ea2c787
Shell: Pledge sigaction
...
The shell is wiring up signal handlers, and when they get torn
down by Core::EventLoop, they are reset, which requires sigaction.
2020-07-09 21:58:07 +02:00
Tom
6dfd503518
Shell: Handle signals asynchronously
...
Fixes #2717
2020-07-09 21:58:07 +02:00
Tom
6751d03ea7
LibCore: Add register_signal and unregister_signal to EventLoop
...
This allows safer asynchronous handling of signals. Signals are
dispatched with highest priority.
2020-07-09 21:58:07 +02:00
Tom
dadd53e4f2
AK: HashTable/HashMap return whether action was performed for set/remove
...
This allows performing an action based on whether something
was actually added or removed without having to look it up
prior to calling set() or remove().
2020-07-09 21:58:07 +02:00
Tom
df54229954
LibVT: Set scrollbar page size
2020-07-09 21:56:45 +02:00
Tom
fc568ea13a
LibGUI: Make scrollbar thumb size relative to content size
...
In order to calculate a thumb size that is a representation
of the visible portion (page) of the content, that information
needs to be taken into account.
2020-07-09 21:56:45 +02:00
Tom
6df87b51f7
Kernel: Protect Inode list with SpinLock ( #2748 )
...
Fixes crashes when a context switch happens in the middle
of modifying it, or when another thread on another processor
modifies it at the same time.
2020-07-09 21:51:58 +02:00
Tom
d4b87fb18e
LibGUI: Implement IconView auto-scrolling when trying to select items out of view
...
If selecting in a large icon view, and dragging the mouse outside
of the widget, or close to the border of it, start scrolling
automatically. This allows for selecting large amount of items
that exceed the amount that can be displayed.
2020-07-09 21:51:01 +02:00