Compare commits

...

1555 Commits
master ... gpl

Author SHA1 Message Date
MerryMage
086c92a811 constant_propagation_pass: Fold IsZero 2020-04-22 00:20:38 +01:00
MerryMage
9fa89ff83c constant_propagation_pass: Fold shifts 2020-04-21 23:36:55 +01:00
MerryMage
dade3ad11b A64: Specialize arithmetic shift SBFM aliases 2020-04-20 21:34:34 +01:00
MerryMage
b408dcea29 A64: Specialize sign-extension SBFM aliases 2020-04-20 20:44:55 +01:00
MerryMage
920769f82e constant_propagation_pass: Prepare for IR matchers 2020-04-20 20:34:45 +01:00
MerryMage
54a6956d82 constant_propagation_pass: Propagate constants across commutative operations
e.g. (a & b) & c == a & (b & c) where b and c are constants
2020-04-20 19:34:08 +01:00
MerryMage
5fa859557a IR: Add ReplicateBit microinstruction 2020-04-20 17:56:16 +01:00
MerryMage
a7c364cde7 externals: Update mp to 649fde1
Merge commit '0197a704b0988b6e27db4ec00515cdc65a02c70f'
2020-04-20 17:04:59 +01:00
MerryMage
0197a704b0 Squashed 'externals/mp/' changes from 29cb5588..649fde1e
649fde1e typelist: Add drop
5efe868d travis: Drop GCC 7 from CI
c3f890f1 Update to use new metavalue types
c4dd1c9b metavalue: Add some common operations
7da45c71 Remove unnecessary public keyword for struct inheritance
287d8e7e Correct typos in file headers

git-subtree-dir: externals/mp
git-subtree-split: 649fde1e814f9ce5b04d7ddeb940244d9f63cb2f
2020-04-20 17:04:59 +01:00
MerryMage
d3d77c5687 value: Add GetInstRecursive 2020-04-20 16:15:02 +01:00
MerryMage
b8013ecb18 print_info: Add optimized IR output for A64 2020-04-20 16:13:18 +01:00
MerryMage
592a3427b9 ir_opt: Add IdentityRemovalPass 2020-04-20 16:12:19 +01:00
MerryMage
0be90cd187 value: Add IsIdentity function 2020-04-20 16:11:51 +01:00
MerryMage
c5148641df A64/decoder: Use a lookup table instead of doing a linear scan 2020-04-19 21:11:03 +01:00
MerryMage
a3cd05577c A64: Add enable_optimizations configuration option
Allow library users to disable optimizations for debugging reasons.
2020-04-19 21:11:03 +01:00
MerryMage
e4b9043fcb emit_x64_floating_point: SSE2 implementation for DenormalsAreZero 2020-04-19 14:38:38 +01:00
MerryMage
8d1699ba2d CMakeLists: option only works for boolean settings 2020-04-18 11:40:58 +01:00
MerryMage
164ce9df7a CMakeLists: Add DYNARMIC_FRONTENDS option
Allows library user to select which frontends to enable
2020-04-18 10:49:52 +01:00
MerryMage
e81c3b3b95 travis: Ensure python version is >= 3.5 2020-04-18 00:04:23 +01:00
MerryMage
39cbcf1027 A32: Detect unpredictable LDM/STM instructions 2020-04-17 23:52:24 +01:00
MerryMage
4305c7428a emit_x64: Do not clear fast_dispatch_table unnecessarily
Reduces invalidation overhead
2020-04-15 22:01:10 +01:00
MerryMage
1731046efb travis: Re-enable most tests 2020-04-15 21:42:18 +01:00
MerryMage
19050b9e1c fuzz_with_unicorn: Add large random block testing 2020-04-15 21:42:18 +01:00
MerryMage
4420758885 a64_emit_x64: Fix location descriptor generation in GenTerminalHandlers 2020-04-15 21:42:18 +01:00
MerryMage
d3241e78ee emit_x64_data_processing: EmitMaskedShift: Use appropriately sized immediates 2020-04-15 21:42:18 +01:00
MerryMage
bb08f764b1 exception_handler_windows: Do not attempt to call cb when cb isn't callable 2020-04-13 09:55:18 +01:00
MerryMage
938e89e7fc backend/x64: Add fastmem support to Windows exception handler 2020-04-09 15:21:56 +01:00
MerryMage
72dab403f1 backend/x64: Add POSIX exception handler with fastmem support 2020-04-08 22:42:20 +01:00
MerryMage
e4f3a78e6f backend/x64: Add macOS exception handler with fastmem support 2020-04-08 22:03:37 +01:00
MerryMage
f18fa7edb4 a32_emit_x64: Implement fastmem 2020-04-08 22:03:37 +01:00
MerryMage
634d6dc184 a32_emit_x64: Fully wrapped memory fallbacks
In the same style as the A64 backend
2020-04-08 14:49:01 +01:00
MerryMage
79490e9f24 a32_emit_x64: Use r14 for page_table pointer 2020-04-08 14:11:15 +01:00
MerryMage
45c0c3a3b4 reg_alloc: Explicitly specify GPR and XMM order
This allows each backend to modify what registers they want to use and their preferred orderings
2020-04-08 13:19:26 +01:00
MerryMage
e52524b203 a32_emit_x64: Make {Read,Write}Memory member functions of A32EmitX64 2020-04-08 12:59:40 +01:00
MerryMage
a59a2d7661 emit_x64_saturation: Prefer changeBit to setBit 2020-04-08 12:59:40 +01:00
MerryMage
29f2267cf9 backend/x64: Make ExceptionHandler its own class 2020-04-08 12:59:40 +01:00
MerryMage
41a2e65274 backend/x64: Rename namespace BackendX64 -> Backend::X64 2020-04-08 11:46:36 +01:00
MerryMage
0973ec8640 block_of_code: Reduce jmps in dispatcher loop 2020-04-07 19:35:36 +01:00
MerryMage
b58048a5a8 block_of_code: Always specify codeptr to run from 2020-04-06 15:55:25 +01:00
MerryMage
c24b15be64 A32: Add Step 2020-04-06 15:55:24 +01:00
MerryMage
8cbba8adf9 A64: Add Step
Allow for stepping instruction-by-instruction
2020-04-06 15:33:49 +01:00
MerryMage
58be30f06d appveyor: Remove DYNARMIC_USE_SYSTEM_BOOST option
We no longer use this as a cmake option.
2020-04-05 23:42:47 +01:00
MerryMage
3415f47579 IR: Add masked shift IR instructions
Also use these in the A64 frontend to avoid the need to mask the shift amount.
2020-04-05 23:42:47 +01:00
MerryMage
42722392de cast_util: Add FptrCast
Reduce unnecessary type duplication when casting a lambda to a function pointer.
2020-04-04 10:57:41 +01:00
MerryMage
254f4e3659 lut_from_list: Reduce number of required template arguments 2020-04-04 10:06:55 +01:00
MerryMage
ea0cb8ca4c travis: Temporarily disable unicorn-related tests 2020-04-04 09:01:11 +01:00
MerryMage
6a014e3569 mp: Migrate to shared version of mp library 2020-04-04 01:30:36 +01:00
MerryMage
b6476285a6 externals: Add mp
Merge commit '01586664ad6a11977026a59b6a656588bd4bea16' as 'externals/mp'
2020-04-04 00:33:33 +01:00
MerryMage
01586664ad Squashed 'externals/mp/' content from commit 29cb5588
git-subtree-dir: externals/mp
git-subtree-split: 29cb5588da3a18ed571a0e41622900a01b9f01eb
2020-04-04 00:32:25 +01:00
MerryMage
607dd2c95e mp/function_info: Add parameter_count_v 2020-04-02 13:33:53 +01:00
MerryMage
3315faf592 bit_util: Add CountLeadingZeros 2020-04-02 13:33:53 +01:00
MerryMage
be2f78bb60 print_info: Add -exec parameter to test execution 2020-04-02 13:33:53 +01:00
MerryMage
de63384ad4 a64_emit_x64: Reduce patchpoint sizes 2020-03-31 19:14:02 +01:00
MerryMage
a84a746831 A64: Add options for detecting misaligned loads and stores 2020-03-31 14:45:04 +01:00
Marshall Mohror
f1bfa5b5c0
A32/x64: Create a global_offset optimization for the page table (#507)
Instead of looking up the page table like:
  table[addr >> 12][addr & 0xFFF]
We can use a global offset on the table to query the memory like:
  table[addr >> 12][addr]

This saves two instructions on *every* memory access within the recompiler.

Original change by degasus in A64 emitter
2020-03-22 17:55:07 +00:00
MerryMage
525cac401e ir/basic_block: Add FastDispatchHint to TerminalToString
Use a boost::static_visitor to ensure this is caught at compile-time in the future.
2020-03-21 13:20:46 +00:00
Lioncash
0046466107 A64/impl: Move AccType and MemOp enum into general IR emitter header
These will be used by both frontends in the future, so this performs the
migratory changes separate from the changes that will make use of them.
2020-03-15 22:19:16 +00:00
Lioncash
206bb7074a externals: Update catch to 2.11.1
Updates our unit testing library from 2.9.1 to 2.11.1.

Keeps it up to date.
2020-01-27 14:10:20 +00:00
Merry
f6ae9e1c33
Merge pull request #505 from degasus/page_table
A64/x64: Create a global_offset optimization for the page table.
2019-12-31 18:52:10 +00:00
Markus Wick
f2c7c6a0d0 A64/x64: Create a global_offset optimization for the page table.
Instead of looking up the page table like:
  table[addr >> 12][addr & 0xFFF]
We can use a global offset on the table to query the memory like:
  table[addr >> 12][addr]

This saves two instructions on *every* memory access within the recompiler.

Thanks at skmp for the idea.
2019-12-31 00:08:35 +01:00
MerryMage
087a74417a Reduce requirements to macOS 10.12 2019-08-14 21:14:23 +01:00
MerryMage
79db0c7c40 a32_emit_x64: Use std::get_if in EmitA32Coproc* 2019-08-14 21:14:21 +01:00
MerryMage
8c6cab482f CMakeLists: Put -Wfatal-errors behind a CMake flag 2019-08-14 20:50:36 +01:00
MerryMage
af8e6c4127 test_arm_instruction: Revive some old tests 2019-07-28 21:31:05 +01:00
MerryMage
156cfa97db constant_propagation_pass: Handle GetCarryFromOp for MostSignificantWord 2019-07-28 21:28:02 +01:00
MerryMage
6921ef5632 a32_interface: Remove unused TransferJitState function 2019-07-28 21:23:16 +01:00
MerryMage
3aecba9833 a32_jitstate: Only transfer required state
Importantly, reset exclusive state upon transfer.
2019-07-28 18:59:44 +01:00
MerryMage
0e7b6b1a60 A32/Thumb: Correct behaviour for UDF and Unpredictable instructions
Raise an exception instead of calling the interpreter and ASSERT-ing respectively.
2019-07-27 19:56:18 +01:00
MerryMage
1b17d1e7bd fuzz_arm: Test MSR and MRS instructions against unicorn
* Add always_little_endian option to mach unicorn behavior.
* Correct CPSR.Mode = Usermode
2019-07-27 19:54:57 +01:00
MerryMage
993784faa3 print_info: Add support for printing A32 instructions 2019-07-27 16:33:19 +01:00
MerryMage
e656eb0b82 a32_emit_x64: EmitA32SetCpsr: BUGFIX: Actually set CPSR.GE
Was unintentionally masking the writing of CPSR.GE due to 32-bit immediate sign extension.
2019-07-27 08:29:32 +01:00
MerryMage
6049e3ef91 a32_emit_x64: GenTerminalHandlers: Remove unnecessary mov 2019-07-27 08:28:39 +01:00
MerryMage
e814b47812 A64: Add hook_hint_instructions option 2019-07-25 12:15:54 +01:00
MerryMage
534eb0fe1d A32: Add hook_hint_instructions option 2019-07-25 12:11:39 +01:00
MerryMage
254ab9355e a32_jitstate: Consolidate upper bits of location descriptor into upper_location_descriptor
Also solves a performance regression initially introduced by b6e8297e369f2dc4758bafe944e51efb8d1a2552,
primarily due to excessively mismatched load/store sizes causing less than optimal load-to-store forwarding.
2019-07-25 11:40:40 +01:00
MerryMage
dc8e6ccf74 CMakeLists: Temporarily remove export
Unable to export fmt in projects that have DYNARMIC_NO_BUNDLED_FMT enabled
2019-07-23 21:42:14 +01:00
Lioncash
e1709546f9
externals: Update catch to 2.9.1
Keeps the unit-testing library up to date.
2019-06-17 06:36:01 -04:00
Merry
313622a53a
Merge pull request #503 from lioncash/cmp
A64: Implement half-precision variants of FCMEQ
2019-05-30 00:58:57 +01:00
Merry
f67690157a
Merge pull request #502 from lioncash/header
General: Remove unnecessary includes
2019-05-27 13:45:05 +01:00
Lioncash
4715b11216
A64: Implement all half-precision variants of FCMEQ 2019-05-25 23:51:39 -04:00
Lioncash
a3f211847c
frontend/ir_emitter: Add half-precision opcode for FPVectorEquals 2019-05-25 23:51:39 -04:00
Lioncash
6d8c9a7dd9
common/fp/op: Add soft-float implementation of FPCompareEQ
This will be used to implement the half-precision floating-point
variants of FCMEQ in following changes.
2019-05-25 23:51:35 -04:00
Lioncash
a9e12969c0
backend/x64/reg_alloc: Apply const where applicable
Also tidies up bracing where applicable along the way.
2019-05-25 17:41:24 -04:00
Lioncash
0a5a34bda4
backend/x64/emit_*: Apply const where applicable 2019-05-25 17:35:05 -04:00
Lioncash
81a3c1c477
A64/translate/*: Apply const where applicable
Just some tidying up for consistency
2019-05-25 17:27:01 -04:00
Lioncash
dfca10ed73
disassembler_arm: Apply const where applicable 2019-05-25 17:15:00 -04:00
Lioncash
8a4439808d
a64_emit_x64: Apply [[maybe_unused]] to unused lambda parameter
This can result in an unused variable warning on Windows otherwise.
2019-05-25 17:07:23 -04:00
Lioncash
d079a4812c
A64/translate/impl: Mark DecodeBitMasks and AdvSIMDExpandImm as static
These don't rely on instance state to perform their behavior. They're
just helper functions.
2019-05-24 02:29:41 -04:00
Lioncash
4dc39252fd
x64/exception_handler_windows: Join namespace declaration
Uses a nested namespace declaration like the rest of the codebase.
2019-05-24 02:18:36 -04:00
Lioncash
2f09577dbf
a32_interface: Remove duplicated documentation comments
These already exist in the header, so these ones can be removed.
2019-05-24 02:15:51 -04:00
Lioncash
d01ec837d2
frontend/A32/types: Remove redundant std::string initializer
std::string initializes to empty by default. While we're at it, brace a
lone unbraced if statement.
2019-05-24 02:05:19 -04:00
Lioncash
31754c6918
ir_opt/a64_get_set_elimination_pass: Remove redundant return
This lambda function has a void return type, so we don't need to
explicitly return at the end of it.
2019-05-24 02:03:28 -04:00
Lioncash
76ca184afc
General: Make parameter names from declarations and implementations consistent
Most of the time when this occurs, it's a bug. Thankfully this isn't the
case. However, we can resolve these cases to make the codebase more
consistent.
2019-05-24 01:59:08 -04:00
Lioncash
c6b321d31c
A32/translate/translate: Add missing doxygen parameter string 2019-05-24 01:48:00 -04:00
Lioncash
2bc8a095dd
General: Correct typos is code comments 2019-05-24 01:37:03 -04:00
Lioncash
268d08511e
a32_interface: std::move UserConfig where applicable
UserConfig instances contain up to 16 std::shared_ptr<Coprocessor>
instances. We can std::move here to avoid performing 16 redundant atomic
reference increment and decrement operations.

Mostly inconsequential on x64, but we may as well signify intent.
2019-05-23 22:09:16 -04:00
Lioncash
9100696696
ir/basic_block: std::move Terminal within SetTerminal and ReplaceTerminal
A terminal isn't a trivial type (and boost::variant is allowed to heap
allocate), so we can std::move it here to avoid a redundant copy.
2019-05-23 22:05:45 -04:00
Lioncash
72f863a223
ir/terminal: std::move constructor parameters where applicable
Allows the compiler to choose the most suitable code in this scenario,
given a Terminal isn't a trivial type.
2019-05-23 22:02:32 -04:00
Lioncash
1d65e3a521
a32_interface: Default destructor in the cpp file
Makes it more consistent with code throughout the codebase.
2019-05-23 21:56:24 -04:00
Lioncash
a178031d6c
General: Remove unnecessary includes
Removes unnecessary header dependencies that have accumulated over time
as changes have been made. Lessens the amount of files that need to be
rebuilt when the headers change.
2019-05-23 21:43:10 -04:00
Lioncash
884d759eba
A32/coprocessor: Remove lingering boost mention in documentation comment
This should have been changed to mention std::monostate, but was
overlooked during the transition to standardized facilities.
2019-05-18 15:10:42 -04:00
Lioncash
7fe1a40bf4
common/cast_util: Declare BitCast and BitCastPointee with the noexcept specifier
std::bit_cast is also defined with the noexcept specifier, so we can do
the same here to match up with it and stay similar with the standard
library.
2019-05-18 15:06:27 -04:00
Lioncash
0765f0ce27
frontend/A32/ir_emitter: Remove unnecessary includes
std::initializer_list isn't used anywhere in here, and we can just
forward declare the CoprocReg enum to avoid needing to include the
header.
2019-05-18 14:31:31 -04:00
Lioncash
07e29a9f82
A32/A64: Make public header inclusions consistent
For all public header inclusions, we use the <> form of including them
as opposed to "", which we typically use for internal headers.
2019-05-18 14:10:39 -04:00
Lioncash
6caeadbe42
A32: Make includes consistent
Normalizes includes to be relative to the project root, like the rest of
the includes in the project.
2019-05-18 14:06:38 -04:00
Lioncash
5e6568dffa
A64/fuzz_with_unicorn: Avoid repeated unnecessary library calls in RunTestInstance()
Repeatedly retrieving the vectors and registers from unicorn involves
copying the entire set of registers and vectors by value instead of
simply retrieving a reference to them. Instead, we can just do the work
once and print out the values.

While we're at it, also make our bracing consistent.
2019-05-17 14:08:26 -04:00
MerryMage
3d2c511928 travis: Test on GCC 8 2019-05-08 22:41:01 +01:00
MerryMage
9f1233a236 CMakeLists: Define FMT_USE_USER_DEFINED_LITERALS=0
This disable a fmtlib feature that depends on a non-standard feature
for its implementation.
2019-05-08 22:18:56 +01:00
Lioncash
2683a9a3e3
Revert "CMakeLists: Handle DYNARMIC_NO_BUNDLED_FMT in relation to export()"
I was being silly. This isn't required.

This reverts commit 00b79cbb72c61744470e0aa1a96b673702b33931.
2019-05-07 03:17:43 -04:00
Lioncash
00b79cbb72
CMakeLists: Handle DYNARMIC_NO_BUNDLED_FMT in relation to export()
This is pretty gross, but until DYNARMIC_NO_BUNDLED_FMT is eliminated,
this fixes the use of it in existing libraries or applications making
use of dynarmic.
2019-05-06 14:29:36 -04:00
MerryMage
11fab29834 A32/translate_thumb: Split off implementation into thumb16 and thumb32 2019-05-06 17:48:27 +01:00
MerryMage
8434f748e4 A32/translate: Rename translate_arm directory to impl
Mirror what the A64 frontend does.
2019-05-06 17:31:00 +01:00
MerryMage
3af0bdc381 Add .gitignore 2019-05-06 12:10:25 +01:00
MerryMage
69c7e77953 travis: Rename test-a64 to test-with-unicorn
Also remove [a64] filter so that the A32 frontend is exercised as well.
2019-05-06 00:49:01 +01:00
MerryMage
291b237f96 A32/location_descriptor: Add CPSR.IT to A32::LocationDescriptor 2019-05-06 00:28:45 +01:00
MerryMage
bacabcd39c PSR: Use Common::ModifyBit{,s} 2019-05-05 23:50:34 +01:00
MerryMage
94632525e0 A32: Add ITState 2019-05-05 23:50:31 +01:00
MerryMage
b6e8297e36 a32_jitstate: Optimize runtime location descriptor calculation
Calculation is now one unaligned 64-bit load.
2019-05-05 23:24:57 +01:00
MerryMage
205e60273c a32_jitstate: Remove fpsr_idc
We do not really have accurate FPSR state in any case.
2019-05-05 23:19:08 +01:00
MerryMage
e5e8036917 {a32,a64}_jitstate: Rename CPSR_* to cpsr_* 2019-05-05 19:49:54 +01:00
MerryMage
ddd5699a83 a32_jitstate: Remove old_FPSCR 2019-05-05 19:47:38 +01:00
MerryMage
0aae9ea07c a32_jitstate: Rename FPSCR_nzcv to fpsr_nzcv 2019-05-05 19:46:57 +01:00
MerryMage
8dc9aec9db a32_jitstate: Rename FPSCR_mode to fpcr_mode 2019-05-05 19:45:45 +01:00
MerryMage
0fb12df549 {a32,a64}_jitstate: Rename FPSCR_IDC to fpsr_idc 2019-05-05 19:44:12 +01:00
MerryMage
33715d2a97 {a32,a64}_jitstate: Remove FPSCR_UFC 2019-05-05 19:42:17 +01:00
MerryMage
0f20a56fe9 a32_jitstate: Enable SSE FTZ and DAZ 2019-05-05 19:40:14 +01:00
MerryMage
852591ff37 a32_jitstate: Remove exception trap enables from FPSCR_MODE_MASK
We don't currently use this for anything (we do not currently trap
floating point exceptions).

This frees these bits up for other purposes.
2019-05-05 19:38:55 +01:00
Merry
c3d20e4ebf
Merge pull request #500 from lioncash/cbz
A32: Implement Thumb-1's CBZ/CBNZ instructions
2019-05-05 18:48:13 +01:00
MerryMage
0cca95d9eb tests: Fix Windows build when DYNARMIC_TESTS_USE_UNICORN is enabled 2019-05-05 18:43:58 +01:00
Merry
766f368f7b
Merge pull request #498 from lioncash/ahp
A32/location_descriptor: Add AHP bit to the FPSCR mask
2019-05-05 11:50:37 +01:00
Lioncash
4a7d62d528
common/fp/info: Make formatting of FPInfo struct member functions consistent
Orgranizes the functions to all be consistent with the half-precision
specialization.
2019-05-04 21:24:18 -04:00
Lioncash
3991361352
common/fp/util: Make ProcessNaN utility functions constexpr
Nothing in particular prevents these from being constexpr. Do so to make
them consistent with the bulk of other functions in this header that are
constexpr.
2019-05-04 21:20:43 -04:00
Lioncash
4cfd1f28cc
common/fp/op/FPNeg: Make FPNeg constexpr
Negation in (standard IEEE) floating-point is simply flipping the sign-bit, so this
operation will never be more complex than what is presented here, making
constexpr a reasonable allowance.
2019-05-04 21:07:49 -04:00
Lioncash
75fd25b2ec
CMakeLists: Add FPNeg.h to the library target sources
Ensures that the header shows up in IDE generated projects.
2019-05-04 21:05:51 -04:00
Lioncash
94717dc11a
general: Remove trailing spaces
General code-related cleanup. Gets rid of trailing spaces in the
codebase.
2019-05-04 21:03:34 -04:00
Lioncash
0085c21321
x64/reg_alloc: Remove reference qualifier to variable in GetArgumentInfo()
The result of GetArg() is returned by value, so this is essentially
still a copy. While the previous code *is* valid, this communicates what
is actually happening a little more explicitly.
2019-05-04 19:15:19 -04:00
Lioncash
f8814e7e05
ir_opt/verification_pass: Add include for std::puts
Ensures that the header dependency is always satisfied directly, and not
through other project headers. While we're at it, we can qualify the
call with the std:: namespace.
2019-05-04 19:10:05 -04:00
Lioncash
bd0ed7ee79
ir_opt/verification_pass: Eliminate redundant GetArg()
Given the same argument is used inside the condition's body if it's
true, we can just utilize the local to cut out a GetArg() operation.
Avoids redundant internal assertion checking.
2019-05-04 19:07:45 -04:00
Merry
161f0ba2fa
Merge pull request #499 from lioncash/movw
A32: Implement ARM-mode MOVW
2019-05-04 16:53:01 +01:00
Merry
ff75a409b6
Merge pull request #497 from lioncash/boost
A32/coprocessor: Remove boost from public interface
2019-05-04 16:52:24 +01:00
Lioncash
f0f9fd1065
CMakeLists: Specify the /volatile flag with standard-conforming semantics
Makes Windows builds more standard-compliant. Given we currently make no
use of volatile, and the libraries we currently use don't use it any
meaningful way, this is safe to specify without worrying.
2019-05-04 00:46:25 -04:00
Lioncash
6f7fbb31a1
CMakeLists: Add /Zc:externConstexpr compilation flag
Improves standard conformance on Windows builds.
2019-05-04 00:40:12 -04:00
Lioncash
c65ea6a92d
CMakeLists: Remove setting of CMAKE_WARN_DEPRECATED
CMake documentation states:
    "If this variable is not set, CMake behaves as if it were set to TRUE."

So this isn't needed, as it's the default behavior.
2019-05-04 00:17:29 -04:00
Lioncash
d56ed7e513
CMakeLists: Turn generic target path into an error
There's currently no way this path can occur and result in any
functioning executable. The recompiler backends are platform-specific.
If those platforms aren't available, then it's quite literally
impossible to use this library for anything meaningful. Instead of
defining a generic architecture and continuing on, notify the developer
that their platform is not currently supported.
2019-05-04 00:10:46 -04:00
Lioncash
13c3f25ac5
CMakeLists: Remove detection of 32-bit platforms
We currently have no plans to add 32-bit host architecture support, so
we don't even need to check for these platforms.
2019-05-04 00:04:15 -04:00
Lioncash
2f8167a3e0
block_of_code: Use variable template variants of type traits
Now all type traits are using the variable template variants where
applicable.
2019-05-03 22:55:50 -04:00
Lioncash
9d9ba745db
dynarmic_tests: Use variable template equivalents of type traits where applicable
Same thing, same readability, less writing.
2019-05-03 22:44:38 -04:00
Lioncash
835f490765
frontend/decoder/decoder_detail: Replace std::is_same, with std::is_same_v
Same thing, same readability, less characters.
2019-05-03 22:41:53 -04:00
Lioncash
fb95482a85
A32: Implement Thumb-1's CBZ/CBNZ instructions
Introduced in ARMv6T2, this allows for short forward branches.
2019-05-03 19:29:08 -04:00
Lioncash
80320bfed0
frontend/ir/ir_emitter: Add A32 equivalent to A64's SetCheckBit
This will be used in a subsequent change to implement ARMv6T2's CBZ/CBNZ
Thumb-1 instructions.
2019-05-03 19:13:21 -04:00
Lioncash
17f6494432
A32: Implement ARM-mode MOVW
Introduced to the ISA in ARMv6T2
2019-05-03 18:00:54 -04:00
Lioncash
19f21d0be2
travis: Bump macOS deployment version to 10.14
Some of std::variant's functions are only available in 10.14 and later.
2019-05-03 16:36:58 -04:00
Merry
c3b92ed7ee
Merge pull request #496 from lioncash/thumb-hint
A32: Implement Thumb-1 hint instructions
2019-05-03 21:22:37 +01:00
Lioncash
64ffdb6d14
A32: Implement Thumb-1 variant of SEVL
While we're at it, also add the Thumb-2 encoding to the encoding table
to make sure it isn't forgotten about in the future.
2019-05-03 16:16:07 -04:00
Lioncash
ae7aa581b8
A32: Implement the ARM-mode variant of SEVL 2019-05-03 16:16:07 -04:00
Lioncash
245d41ac93
A32: Implement Thumb-1 variant of YIELD 2019-05-03 16:15:11 -04:00
Lioncash
293d5355b6
A32: Implement Thumb-1 variant of WFI 2019-05-03 16:15:11 -04:00
Lioncash
b6a6a23f8d
A32: Implement Thumb-1 variant of WFE 2019-05-03 16:15:11 -04:00
Lioncash
2396d6ace9
A32: Implement Thumb-1 variant of SEV 2019-05-03 16:15:11 -04:00
Lioncash
489083438b
A32/translate_thumb: Add helper function for raising exceptions
Similar to the variant within the ARM-mode translator visitor. This will
be used in subsequent changes to implement the hint instructions
introduced in ARMv7.
2019-05-03 16:15:11 -04:00
Lioncash
4e21593a8b
A32: Implement Thumb-1 variant of NOP 2019-05-03 16:15:07 -04:00
Merry
a3456b39ac
Merge pull request #495 from lioncash/bkpt
A32: Implement Thumb-16's variant of BKPT
2019-05-03 21:10:24 +01:00
Merry
2debd4dc5a
Merge pull request #494 from lioncash/pldw
A32: Handle PLDW
2019-05-03 21:09:13 +01:00
Lioncash
44de480aea
A32/location_descriptor: Add AHP bit to the FPSCR mask
Ensures the alternate half-precision state is preserved within the
location descriptors, which will be necessary when implementing the
half-precision extensions for VFP and NEON.
2019-05-03 15:59:31 -04:00
Lioncash
41c1aa61df
A32/coprocessor: Remove boost from public interface
Removes a boost header from the public includes in favor of using the
standard-provided std::variant.

The use of boost in public interfaces is often a dealbreaker for some
people. Given we use std::optional in the header already, we can
transition over to std::variant from boost::variant.

With this removal, this makes all of our dependencies internal to the
library itself.
2019-05-03 12:43:57 -04:00
Lioncash
ae4d168c76
a64_emit_x64: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-03 12:27:27 -04:00
Lioncash
7ab5b65706
a32_emit_x64: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-03 12:15:30 -04:00
Lioncash
2d9a155de2
emit_x64: Use const on locals where applicable 2019-05-03 11:54:44 -04:00
Lioncash
c8860a0742
emit_x64: Remove unnecessary typename in GetBasicBlock()
This can be deduced from the name alone.
2019-05-03 11:51:46 -04:00
Lioncash
eb8bf6630a
A32: Implement Thumb-16's variant of BKPT 2019-05-02 22:40:07 -04:00
Lioncash
b8bfe3ac51
A32/disassembler_arm: Remove <unimplemented> from hint instruction output
Given we now support hooking these hint instructions, we can consider
them implemented.
2019-05-02 22:09:03 -04:00
Lioncash
c93451823f
A32: Handle different variants of PLD 2019-05-02 20:48:15 -04:00
Lioncash
3a29baabc0
emit_x64_vector: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-02 19:22:49 -04:00
Lioncash
9f86639b46
emit_x64_saturation: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-02 19:22:49 -04:00
Lioncash
0b2ba9410e
emit_x64_packed: Use const on locals where applicable
Normalizes the use of const across the source file.
2019-05-02 19:22:49 -04:00
Lioncash
d1bb04b035
emit_x64_data_processing: Use const on locals where applicable
Normalizes the use of const across the source file.
2019-05-02 19:22:49 -04:00
MerryMage
244222bed5 fuzz_thumb: Disable fuzzing longer blocks 2019-05-03 00:17:48 +01:00
Merry
120d264bc9
Merge pull request #493 from lioncash/ir
frontend/ir/ir_emitter: Remove unnecessary logical shift overloads
2019-05-02 23:47:16 +01:00
Merry
9a9906bc1b
Merge pull request #492 from lioncash/vfp
A32: Rename vfp2-related files to vfp
2019-05-02 23:46:53 +01:00
Merry
f2fa3853b7
Merge pull request #491 from lioncash/hint
A32: Allow hooking of hint instructions in ARM mode.
2019-05-02 23:45:59 +01:00
Merry
7fb72ddf93
Merge pull request #490 from lioncash/crc32
A32: Implement ARM-mode CRC32 instructions
2019-05-02 23:45:09 +01:00
Lioncash
ee174e60aa
frontend/ir/ir_emitter: Remove unnecessary logical shift overloads
These aren't necessary anymore, now that the U32U64 overload already
exists.
2019-05-02 18:06:30 -04:00
Lioncash
78a93b0540
A64/translate/impl/impl: Mark locals const where applicable in DecodeBitMasks()
Follows the convention of making immutable state explicit.
2019-05-02 17:46:37 -04:00
MerryMage
71a448c66f block_of_code: Explicitly delete copy constructor 2019-05-02 21:41:49 +01:00
MerryMage
6bf0470e09 Suppress MSVC warning C4702: unreachable code 2019-05-02 21:41:22 +01:00
Lioncash
e5d77334f0
A32: Implement ARM-mode CRC32 instructions
Implements the ARM-mode variants of the CRC32 instructions introduced
within ARMv8. This is also one of the instruction cases where there is
UNPREDICTABLE behavior that is constrained (we must do one of the
options indicated by the reference manual).

In both documented cases of constrained unpredictable behavior, we treat
the instructions as unpredictable in order to allow library users to
hook the unpredictable exception to provide the intended behavior they
desire.
2019-05-02 16:22:10 -04:00
Lioncash
fc0ecdf3b1
travis: Make macOS builder use Xcode 10.2
Keeps it targeting the latest Xcode revision.
2019-05-02 11:40:54 -04:00
Lioncash
16a9e3c4d3
dynarmic_tests: Resolve CPSR discrepancies in tests
Unicorn internally checks if the LSB is set in order to determine
whether or not it should assume thumb mode internally. Clearing this
ourselves will always result in the incorrect PSR between runs.
2019-05-02 11:12:36 -04:00
Lioncash
469b6ad90e
A32: Rename vfp2-related files to vfp
Now that we fuzz against Unicorn, we aren't just restricted to VFPv2.
VFPv3 and VFPv4 facilities can now be implemented. This renames
constructs mentioning VFPv2 to just refer to VFP.
2019-05-02 10:25:43 -04:00
Lioncash
74cf752b2c
frontend/ir/ir_emitter: Amend arguments to conversion opcodes
Accidentally caused within 967d1fcc8d6f60749a162a96b997439450fed687.
That one's on me. My bad.
2019-05-02 10:24:26 -04:00
Lioncash
1634059618
{A32, A64}/types: Use std::array deduction guides where applicable
We also make the arrays static here, as MSVC tends to load the whole
array every time the function is called, instead of storing the data
within rodata.

This also line breaks the elements a little earlier for readability.
2019-05-02 09:28:31 -04:00
Lioncash
13e9d48720
frontend/ir/type: Generify std::array declaration
With deduction guides, we can eliminate the need to explicitly size the
array. Also newlines the elements based off their relation, making it
slightly nicer to read.
2019-05-02 09:08:43 -04:00
Lioncash
994f3cfa33
CMakeLists: Add a namespace to the export
Avoids potentially dumping boost, fmt, and xbyak targets into a
top-level namespace without any qualification, which can lead to build
errors in projects that already make use of them.
2019-05-02 08:39:11 -04:00
Lioncash
362dc5e350
frontend/A32/ir_emitter: Mark locals as const where applicable
Makes const usage consistent within the source file.
2019-05-02 00:07:13 -04:00
Lioncash
9b7a8547b9
frontend/A32/types: Use helper function in operator+ overload
Allows deduplicating an assert and a cast.
2019-05-02 00:03:13 -04:00
Lioncash
28eedda6ff
frontend/A64/types: Make RegNumber() and VecNumber() constexpr
Given they simply perform casting, they can be safely made constexpr.
2019-05-02 00:00:15 -04:00
Lioncash
455a7a0359
frontend/A64/types: Use helper functions in operator+ overloads
Allows us to get rid of another explicit cast.
2019-05-01 23:59:20 -04:00
Lioncash
08cd3f0385
frontend/ir/ir_emitter: Apply const to locals where applicable
Makes const usage consistent with all other functions in the source
file.
2019-05-01 23:54:22 -04:00
Lioncash
967d1fcc8d
frontend/ir/ir_emitter: Use switch constructs in floating point opcodes where applicable
This'll reduce the amount of noise necessary in changes implementing
half-precision instructions, as the type can just be prepended to the
switch cases, instead of rewriting the whole if/else branch.
2019-05-01 23:45:01 -04:00
Lioncash
63c22e9fcb
A32: Allow hooking of hint instructions in ARM mode.
Mirrors the hooking functionality from the AArch64 frontend to make the
behavior of both consistent.
2019-05-01 22:15:49 -04:00
Merry
98c01b0e1a
Merge pull request #489 from lioncash/imm
A32: Replace immediate type aliases with the Imm template
2019-05-01 16:02:44 +01:00
Lioncash
2bd54d6485
A32: Resolve parameter discrepancies discovered via use of the Imm template 2019-04-30 23:58:39 -04:00
Lioncash
17815bdda3
A32: Replace immediate type aliases with the Imm template
Replaces type aliases of raw integral types with the more type-safe Imm
template, like how the AArch64 frontend has been using it.

This makes the two frontends more consistent with one another.
2019-04-28 07:31:00 -04:00
Lioncash
f6a4aaef6e
externals: Update Catch to 2.7.2
Updates Catch from 2.7.0 to 2.7.2. Keeps the unit-testing library up to
date.
2019-04-27 17:36:14 -04:00
Lioncash
f17bf4a352
A32/barrier: Correct PC assignment within ISB
The SetRegister() IR function doesn't allow specifying the PC as a
register. This is a discrepancy that slipped through (my bad). Instead,
we can use BranchWritePC(), like how the other similar PC modifying
locations do it.
2019-04-27 17:22:32 -04:00
Mat M
055fab687d
Merge pull request #488 from lioncash/imm
frontend: Move imm.h to the top-level directory of the frontends
2019-04-27 15:01:12 -04:00
Lioncash
4ed37614c6
frontend: Move imm.h to the top-level directory of the frontends
Preparation to utilize the immediate type within the A32 backend as
well, which will allow eliminating numerous type aliases like Imm4,
Imm5, etc.
2019-04-27 14:53:33 -04:00
Lioncash
6201b0e32d
A32/disassembler_arm: Mark utility functions as static where applicable
These don't depend on class state and can be marked static to make that
explicit.
2019-04-27 09:45:15 -04:00
Mat M
d88e1d027d
Merge pull request #487 from lioncash/fuzz2
a32/fuzz_arm: Use same fuzzing mechanism as AArch64
2019-04-27 09:42:46 -04:00
Merry
19c59bbf26
Merge pull request #486 from lioncash/barrier
A32: Implement barrier instructions introduced in ARMv7
2019-04-27 14:40:06 +01:00
Lioncash
f3679e6278
A32: Implement barrier instructions introduced in ARMv7
Provides basic implementations of the barrier instruction introduced
within ARMv7. Currently these simply mirror the behavior of the AArch64
equivalents.
2019-04-27 08:29:49 -04:00
Lioncash
c32a10ca7e
a32/fuzz_arm: Use same fuzzing mechanism as AArch64
Introduces the same fuzzing mechanism used by the AArch64 code for
fuzzing instruction implementations, getting rid of the need to
manually specify the instruction generator sequences--replacing it with
an instruction blacklist instead.

Much of this change originates from a previous patch made by Mary. This
just makes it interact nicely with the alterations made to get Unicorn
to cooperate properly.
2019-04-27 06:11:55 -04:00
Mat M
b27fe43120
Merge pull request #485 from lioncash/a32
A32: Handle all ARM-mode arithmetic and data processing instructions added in ARMv6T2 and ARMv7
2019-04-26 06:51:24 -04:00
Lioncash
23571f99c5
A32: Implement ARM-mode MLS 2019-04-26 06:50:03 -04:00
Lioncash
adf04f6f9a
A32: Implement ARM-mode MOVT 2019-04-26 06:50:03 -04:00
Lioncash
b4429e7f55
A32: Implement ARM-mode SBFX 2019-04-26 06:50:03 -04:00
Lioncash
42964964ce
A32: Implement ARM-mode UBFX 2019-04-26 06:50:03 -04:00
Lioncash
745dfd5046
A32: Implement ARM-mode BFI 2019-04-26 06:50:02 -04:00
Lioncash
20e499d8d6
A32: Implement ARM-mode BFC 2019-04-26 06:50:02 -04:00
Lioncash
3b7b50b0c0
A32: Implement ARM-mode RBIT 2019-04-26 06:49:56 -04:00
Lioncash
c62b822937
A32: Implement ARM-mode SDIV/UDIV
Now that we have Unicorn in place, we can freely implement instructions
introduced in newer versions of the ARM architecture.
2019-04-21 21:30:29 -04:00
Lioncash
9110e70bd3
travis: Re-enable A32 tests 2019-04-20 06:02:32 -04:00
Lioncash
79af6c118c
a32_unicorn: Silence PC value assertions
Ensure the PC is properly masked off after a run.
2019-04-20 06:02:29 -04:00
Lioncash
43422bc106
travis: Amend build parameters
Currently just run the 64-bit tests.
2019-04-20 05:22:54 -04:00
Lioncash
0d3764569d
fuzz_arm: Tidy up existing tests
Now that we utilize C++17, we can use std::array's deduction guides to
avoid the need to explicitly specify the template arguments.

While we're at it, also use const where applicable.
2019-04-20 05:00:15 -04:00
Lioncash
27e8a41b7f
Merge branch 'fuzz' 2019-04-20 04:19:37 -04:00
Lioncash
bce91ff07b
dynarmic_tests: Remove skyeye interpreter
This is quite a messy interpreter and would require a large amount of
work to bring it up to speed to begin implementing newer portions of the
AArch32 instruction set into Dynarmic.

Given we already have fuzzing with Unicorn set up for
AArch64/AArch32, we can get rid of this and unify our testing
infrastructure.

This will also make building the tests much faster, given a whole
interpreter doesn't need to be built anymore as part of the project.
2019-04-20 04:19:22 -04:00
Lioncash
ad7d439ef5
A32: Fuzz instructions using unicorn
While skyeye was OK previously, now that we have an AArch64 backend,
this also means that we eventually have to support the AArch32
counterpart to it. Unfortunately, SkyEye is only compatible up to
ARMv6K, so we woud need to do a lot of work to bring the interpreter up
to speed with things to even begin testing new instruction
implementations.

For the AArch64 side of things, we already use Unicorn, so we can toss
out SkyEye in favor of it instead.
2019-04-20 04:17:18 -04:00
Lioncash
127efc592d
A32/translate_thumb: Clean up formatting
Performs a similar tidying up of the Thumb translator, like what was
done with the regular ARM translator to make it consistent with the rest
of the codebase.

The A32 backend (both Thumb and ARM), will likely see more changes to it
in the near future, so this just acts as a "dusting off".
2019-04-20 00:32:25 -04:00
Merry
7316ab18f6
Merge pull request #483 from lioncash/invert
frontend/ir/cond: Remove unused invert() function
2019-04-17 10:45:34 +01:00
Lioncash
66e3b1c1eb
common/fp/op/FPConvert: Remove unnecessary casts in FPConvert()
These were made unnecessary in 2c2fdb435cf8e358a0c5b907ce8131e434df3f22,
but were missed during the initial removal.
2019-04-16 21:53:22 -04:00
Lioncash
fe7c21b687
frontend/ir/cond: Remove unused invert() function
This is no longer used by anything in the codebase, so it can be
removed.
2019-04-16 21:37:12 -04:00
Merry
6377fd9866
Merge pull request #482 from lioncash/fixedfp
A64: Handle half-precision variants of FP->Fixed instructions
2019-04-15 20:08:01 +01:00
MerryMage
732215d68d emit_x64_data_processing: Remove INVALID_REG
INVALID_REG.cvt8() now throws
2019-04-15 16:59:39 +01:00
MerryMage
731aa2df8d externals: Update xbyak to 73ac586
Merge commit 'b0bc810667409c2fddd4e8c7a28ea4b1ffa76a03'
2019-04-15 16:18:43 +01:00
MerryMage
b0bc810667 Squashed 'externals/xbyak/' changes from 4a6fac8a..73ac5866
73ac5866 fix Reg::changeBit

git-subtree-dir: externals/xbyak
git-subtree-split: 73ac5866099b19bd8063f06434e19b9d7bbc9b8d
2019-04-15 16:18:43 +01:00
Lioncash
105d4ed9e5
A64: Handle half-precision variants of FP->Fixed-point instructions 2019-04-15 08:50:00 -04:00
Merry
d32f648578
Merge pull request #481 from lioncash/alloc
ir/basic_block: Forward declare headers where applicable
2019-04-15 13:04:02 +01:00
Merry
c8446bda2b
Merge pull request #480 from lioncash/info
common/fp/info: Make half-precision info struct functions return correctly sized types
2019-04-15 12:14:30 +01:00
Lioncash
f4d0a09bf4
ir/basic_block: Forward declare headers where applicable
Now that the constructor and destructors have been placed within the cpp
file, we can forward declare the memory pool data structures. Now, a
change to the memory pool code won't ripple across the entirety of the
IR emitter.
2019-04-15 06:00:35 -04:00
Lioncash
db78e2f32c
ir/block: Default ctor and dtor in the cpp file
Prevents potentially inlining allocation code everywhere. While we're at
it, also explicitly delete/default the copy/move constructor/assignment
operators to be explicit about them.
2019-04-15 05:58:36 -04:00
Lioncash
2c2fdb435c
common/fp/info: Make half-precision info struct functions return correctly sized types
While initially done to potentially prevent creating bugs due to C++
having a silly type-promotion mechanism involving types < sizeof(int)
and unsignedness, given that the bulk of these functions' usages
are on exit paths, these can return the correct type to avoid the need
to cast at every usage point.
2019-04-15 04:55:00 -04:00
Merry
973c87445e
Merge pull request #479 from lioncash/rsqrts
A64: Handle half-precision variants of FRSQRTS
2019-04-15 08:28:30 +01:00
Lioncash
189692246d
frontend/ir/microinstruction: Add missing fixed-point opcodes to ReadsFromAndWritesToFPSRCumulativeExceptionBits() 2019-04-15 00:55:49 -04:00
Lioncash
1d3fc42bfe
frontend/ir_emitter: Add half-precision->fixed-point opcodes 2019-04-15 00:55:46 -04:00
Lioncash
6c7de6c9c4
common/fp/op/FPToFixed: Add half-precision specialization of FPToFixed 2019-04-15 00:17:44 -04:00
Lioncash
28e0f4fe59
A64: Implement FRSQRTS' half-precision vector variant 2019-04-14 21:12:54 -04:00
Lioncash
6f7a370cfb
A64: Implement FRSQRTS' half-precision scalar variant
With the necessary machinery in place, we can now handle the
half-precision variant.
2019-04-14 21:12:54 -04:00
Lioncash
793b3b38d4
frontend/ir_emitter: Add half-precision opcode variant of FPVectorRSqrtStepFused 2019-04-14 21:12:54 -04:00
Lioncash
db4d134726
frontend/ir_emitter: Add half-precision opcode variant of FPRSqrtStepFused 2019-04-14 21:12:49 -04:00
Lioncash
cff4394717
common/fp/op/FPRSqrtStepFused: Add half-precision specialization for FPRSqrtStepFused 2019-04-14 20:51:58 -04:00
Merry
eea732febf
Merge pull request #478 from lioncash/stepfused
A64: Handle half-precision variants of FRECPE and FRECPS
2019-04-14 12:40:18 +01:00
Merry
0c62dba214
Merge pull request #477 from lioncash/rsqrt
A64: Handle half-precision variants of FRSQRTE
2019-04-14 11:21:05 +01:00
Lioncash
b67cc72213
A64: Implement half-precision vector variant of FRECPE 2019-04-14 06:14:20 -04:00
Lioncash
4b3f5b8a30
A64: Implement half-precision scalar variant of FRECPE 2019-04-14 06:14:20 -04:00
Lioncash
4519e4641c
A64: Implement half-precision vector variant of FRECPS 2019-04-14 06:14:19 -04:00
Lioncash
abcf1a6e09
A64: Implement half-precision scalar variant of FRECPS 2019-04-14 06:14:19 -04:00
Lioncash
c55db96819
frontend/ir_emitter: Add half-precision opcode for FPVectorRecipEstimate 2019-04-14 06:14:19 -04:00
Lioncash
1615ba0adc
frontend/ir_emitter: Add half-precision opcode for FPRecipEstimate 2019-04-14 06:14:19 -04:00
Lioncash
e93161e25b
common/fp/op: Add half-precision specialization for FPRecipEstimate 2019-04-14 06:14:19 -04:00
Lioncash
4ae0a27ea4
frontend/ir_emitter: Add half-precision opcode for FPVectorRecipStepFused 2019-04-14 06:14:19 -04:00
Lioncash
065143b395
frontend/ir_emitter: Add half-precision opcode for FPRecipStepFused 2019-04-14 06:14:18 -04:00
Lioncash
408bbfb766
common/fp/op: Add half-precision specialization for FPRecipStepFused 2019-04-14 06:13:43 -04:00
Lioncash
e35352b69e
A64: Implement half-precision variant of FRSQRTE's vector variant 2019-04-14 06:12:20 -04:00
Lioncash
0f677744bb
A64: Implement half-precision variant of FRSQRTE's scalar variant 2019-04-14 06:12:20 -04:00
Lioncash
5edbb415c5
frontend/ir_emitter: Add half-precision opcode variant for FPVectorRSqrtEstimate 2019-04-14 06:12:20 -04:00
Lioncash
f1e556632c
frontend/ir_emitter: Add half-precision opcode variant for FPRSqrtEstimate 2019-04-14 06:11:45 -04:00
Lioncash
9c9087ea47
common/fp/op/FPRSqrtEstimate: Add half-precision specialization for FPRSqrtEstimate 2019-04-14 06:10:27 -04:00
Merry
5ae8e4e043
Merge pull request #476 from lioncash/frint
A64: Handle half-precision variants of FRINT* instructions
2019-04-14 10:57:09 +01:00
Lioncash
f8fb10289a
A64: Enable half-precision vector FRINT* variants 2019-04-13 18:05:00 -04:00
Lioncash
7c5cc15f4e
A64: Enable half-precision variants of floating-point FRINT* variants
With all the backing machinery in place, we can remove the fallback
check for half-precision.
2019-04-13 17:54:36 -04:00
Lioncash
95a96b32c5
frontend/microinstruction: Add FPVectorRoundInt types to ReadsFromAndWritesToFPSRCumulativeExceptionBits()
All variants were previously missing from this.
2019-04-13 17:51:13 -04:00
Lioncash
722daae0d4
frontend/ir_emitter: Add half-precision variant of FPVectorRoundInt 2019-04-13 17:49:04 -04:00
Lioncash
8243705134
frontend/ir_emitter: Add half-precision variant of FPRoundInt 2019-04-13 17:44:37 -04:00
Lioncash
590388b9ec
fp/op/FPRoundInt: Add half-precision specialization of FPRoundInt 2019-04-13 17:37:45 -04:00
Merry
b34f42575d
Merge pull request #475 from lioncash/muladd
A64: Enable half-precision variants of floating-point multiply-add instructions
2019-04-13 14:30:03 +01:00
Merry
2218912292
A64/location_descriptor: Ensure FZ16 is included in the FPCR mask 2019-04-13 08:05:04 -04:00
Merry
9faf1bdfd4
Merge pull request #474 from lioncash/bracing
load_store_*: Make bracing consistent and variables const where applicable
2019-04-13 10:53:21 +01:00
Merry
5f351a669c
Merge pull request #473 from lioncash/sqshlu
A64: Implement SQSHLU
2019-04-13 08:31:17 +01:00
Lioncash
a935f35553
A64: Implement FMLA/FMLS' half-precision vector indexed variants 2019-04-13 02:19:06 -04:00
Lioncash
caaa04cba1
A64: Implement FMLA/FMLS' half-precision scalar indexed variants 2019-04-13 02:11:44 -04:00
Lioncash
894169dc7a
A64: Implement half-precision vector variants of FMLA/FMLS 2019-04-13 01:48:22 -04:00
Lioncash
278c7ae744
ir/frontend: Add half-precision opcode for FPVectorMulAdd 2019-04-13 01:42:35 -04:00
Lioncash
0eb6412c4d
A64: Enable half-precision floating point variants of FP data-processing three register instructions
This handles half-precision floating point for:

- FMADD
- FMSUB
- FNMADD
- FNMSUB
2019-04-13 01:35:32 -04:00
Lioncash
13b41525cb
frontend/ir_emitter: Add half-precision opcode for FPMulAdd 2019-04-13 00:18:09 -04:00
Lioncash
2ae0c4807a
fp/op/FPMulAdd: Add half-precision floating-point specialization 2019-04-13 00:07:34 -04:00
Lioncash
94ac9becda
load_store_*: Make bracing consistent and variables const where applicable
Makes bracing consistent, and variables const where applicable to be
consistent with the rest of the codebase.

In most bracing cases, they'd need to be added to conditionals that
would involve checking stack pointer alignment in the future anyways.
2019-04-12 23:51:36 -04:00
Lioncash
be3fc0f9ff
A64: Implement SQSHLU's scalar variant 2019-04-12 19:49:33 -04:00
Lioncash
508c77c3ee
A64: Implement SQSHLU's vector variant
The vector shift by immediate category is now fully implemented.
2019-04-12 19:45:20 -04:00
Lioncash
31867874de
frontend/ir_emitter: Add opcodes for signed saturated left shifts with unsigned saturation 2019-04-12 19:44:23 -04:00
Merry
5e77d110cc
Merge pull request #472 from lioncash/exception
general: Mark hash functions as noexcept
2019-04-12 21:33:47 +01:00
Merry
ed8c218076
Merge pull request #471 from lioncash/sqrdmulh
A64: Implement SQRDMULH's scalar vector variant
2019-04-12 20:29:22 +01:00
Lioncash
57629276c1
general: Mark hash functions as noexcept
Generally hash functions shouldn't throw exceptions. It's also a
requirement for the standard library-provided hash functions to not
throw exceptions.

An exception to this rule is made for user-defined specializations,
however we can just be consistent with the standard library on this to
allow it to play nicer with it.

While we're at it, we can also make the std::less specializations
noexcpet as well, since they also can't throw.
2019-04-12 15:27:28 -04:00
Merry
c963996e0b
Merge pull request #470 from lioncash/assert
general: Replace unreachable-imitating assertions with UNREACHABLE()
2019-04-12 20:14:18 +01:00
Merry
8ac3fb8df3
Merge pull request #469 from lioncash/void
A64/impl: Reorganize peculiar void use in V_scalar
2019-04-12 20:13:57 +01:00
Lioncash
f58406333a
A64: Implement SQRDMULH's scalar vector variant
Implements the scalar variant in terms of the vector variant for the
time being.
2019-04-12 15:05:53 -04:00
Lioncash
a5ca872208
general: Replace unreachable-imitating assertions with UNREACHABLE()
We can just use the self-documenting assertion for indicating
unreachable paths, instead of manually passing false and providing a
message.
2019-04-12 14:51:43 -04:00
Lioncash
d75af9d0e1
A64/impl: Reorganize peculiar void use in V_scalar
To a reader this might look particularly strange, given the function
itself has a void return value, but this is actually valid, given the
function in the return statement also has a void return value.

This instead alters it to be a little easier to parse and potentially be
a little less confusing at a glance.
2019-04-12 14:44:16 -04:00
Merry
4ed7009f24
Merge pull request #468 from lioncash/const
ir_opt: Mark locals as const where applicable
2019-04-12 19:15:32 +01:00
Merry
25039d02ff
Merge pull request #467 from lioncash/reserved
A64: Handle reserved instruction cases more specifically where applicable
2019-04-12 19:13:08 +01:00
Merry
5fdbb46008
Merge pull request #466 from lioncash/fcmla
A64: Implement FCMLA's indexed element variant
2019-04-12 08:15:05 +01:00
Lioncash
e244bf4f68
ir_opt/verification_pass: Mark locals as const where applicable
Makes our immutable state a little more explicit.
2019-04-11 18:30:30 -04:00
Lioncash
d02eef2fac
ir_opt/a64_callback_config_pass: Mark locals as const where applicable
Makes our immutable state a little more explicit.
2019-04-11 18:28:11 -04:00
Lioncash
38977fac33
ir_opt/a32_get_set_elimination_pass: Mark local variables as const where applicable
Makes our intended immutable state slightly more explicit.
2019-04-11 18:26:13 -04:00
Lioncash
e299e92698
ir_opt/a32_constant_memory_reads_pass: Apply const where applicable to locals
Makes immutable state just slightly more explicit.
2019-04-11 18:18:32 -04:00
Lioncash
0dca81d20f
A64: Handle reserved instruction cases more specifically where applicable
These are cases that are defined as reserved within the ARMv8 reference
manual, so we can handle them as such instead of as unallocated
encodings.

While this doesn't actually change emulated behavior, it does at least
allow the JIT to generate the more appropriate exception.
2019-04-11 17:47:28 -04:00
Lioncash
06e7e9fbef
A64: Implement FCMLA's indexed element variant
With this, all of the instructions introduced with ARMv8.3-CompNum have
an implementation.
2019-04-11 17:20:06 -04:00
Merry
c635591355
Merge pull request #465 from neobrain/master
CMakeLists: Allow importing dynarmic build trees into other CMake projects
2019-04-11 22:00:46 +01:00
Merry
3a2fc56e81
Merge pull request #464 from lioncash/uqshl
A64: Implement UQSHL (immediate)'s scalar variant
2019-04-11 21:29:03 +01:00
Tony Wasserka
fd4fa20834 CMakeLists: Allow importing dynarmic build trees into other CMake projects 2019-04-11 18:04:57 +02:00
Lioncash
b7a76d6967
simd_scalar_shift_by_immediate: Change UnallocatedEncoding() path in SaturatingShiftLeft to ReservedValue()
Strictly speaking, immh being zero is defined as reserved in the ARMv8
reference manual. This was just an error on my part when introducing the
SQSHL immediate scalar variant.
2019-04-10 15:20:11 -04:00
Lioncash
2769572231
A64: Implement UQSHL (immediate)'s scalar variant
Like SQSHL's immediate scalar variant, we can also implement UQSHL's
immediate scalar variant in terms of the vector variant for the time
being.
2019-04-10 15:12:57 -04:00
Lioncash
24479ecbe5
simd_scalar_shift_by_immediate: Migrate SQSHL implementation to file-scope function
This will allow it to be reused for the implementation of UQSHL.
2019-04-10 15:10:32 -04:00
Merry
2483b6b0dc
Merge pull request #463 from lioncash/sqshl
A64: Implement scalar variant of SQSHL (immediate)
2019-04-10 14:12:52 +01:00
Lioncash
fc729bee8c
A64: Implement scalar variant of SQSHL (immediate)
This can be handled in terms of the vector variant for the time being.
2019-04-09 10:13:14 -04:00
MerryMage
0bcc47a71c README: Update README 2019-04-06 10:56:21 +01:00
Merry
cbeb5c9929
Merge pull request #462 from lioncash/undef
{common/fp, backend/x64}: Prevent undefined left shifts where applicable
2019-04-02 17:22:35 +01:00
Lioncash
06ac561e1c
backend/x64/emit_x64_vector: Prevent undefined behavior within VectorSignedSaturatedShiftLeft
Avoids undefined behavior by potentially left-shifting a signed negative
value.
2019-04-01 19:53:48 -04:00
Lioncash
f4d63ff07d
common/fp/op/FPRecipExponent: Prevent undefined behavior from shifting a negative value
Due to promotion rules (types < int, even if unsigned, get promoted to
int when arithmetic is performed on them), this is a potential spot for
undefined behavior.
2019-04-01 19:51:52 -04:00
Lioncash
89581c0c8c externals/fmt: Update fmt to 5.3.0 2019-03-29 16:34:24 +00:00
Lioncash
8f92310698 externals/xbyak: Update xbyak to 5.77
Keeps the external library up to date.
2019-03-29 16:24:22 +00:00
Merry
b52a9da924
Merge pull request #459 from lioncash/catch
externals: Update catch to 2.7.0
2019-03-28 14:42:02 +00:00
Lioncash
64bbe05fa6 Squashed 'externals/fmt/' changes from 3e75ad98..9e554999
9e554999 Update version
b34d92b0 Bump version
d39ece18 Make rst2md runnable and update changelog
fe2d715f Update changelog
27b30670 Update changelog
68837079 Update changelog
c98b202e Update changelog
587a7f66 Update changelog and docs
84e5170c Update changelog and deprecate visit
130e412b Update changelog and docs
0bbdca5b Fix conversion warnings (#989)
77a72448 Implement fill/align/width for strftime-like formatting
3e01376e Implement fill/align/width parsing in chrono formatter
1f92f8a9 Remove noexcept
8668639a Get rid of null_terminating_iterator in format
93fd473b Add support for builtin terminal colors. (#974)
61ad543c Windows .sln filename changed from FORMAT to FMT
7f7504b3 Clean up docs
37f599b1 Fix docs
8c2e15ae Make printf work in search (#164)
de71db6d Fix asan error (#977)
b180b391 Fix default formatting
24594c74 Disable printing the reset escape code when no style modifiers where applied. (#973)
b0f22247 Implement default chrono formatting
74927607 Add file stream support for stylized text printing. (#967)
f54f3d0f Move chrono-specific code to a separate header
bf1f1c73 Fix time test
b6bc6ec2 Add default ctor and fix use of constexpr macros in text_style
acfa95d4 Workaround a bug in MSVC's strftime (#965)
628f8305 More chrono formatting
aa3b5aba Implement locale-specific minute formatting
639de217 Workaround more MSVC bugs
3242ddf7 Fix warnings
bd110404 Workaround a bug in MSVC
81b5c4a5 Add experimental emphasis support (#961)
7c4eb0fb Fix warnings in time.h
2d624218 Fix another warning
b3168099 Fix a warning
b10ccb83 Add rpclib to projects
0497875f Stop the orgy of casts
37dc495b Simplify MSVC workaround
2ff4996d Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity.Avoid implicit conversion.
77656c67 Fix sign-conversion warnings reported by Clang7
ea5e4790 Fix formatting
86681c4b Update README.rst
e867768e Do not override user provided compile flag
0c7f5c3c Update README.rst
e7e2ab10 Make return type of basic_format_args::max_size() consistent.
29352af3 Update README.rst
68214bd9 More time formatting
bcf3fcd6 Clean up bit fiddling for argument packing
9dcf127f Workaround a bogus MSVC warning
b8b06e3e Fix conversion warnings in Grisu
322b2594 Implement more time specifiers
0835f1ba Use full paths for fmt.pc.in
a084495d Add Ceph to projects
fa1d4dbc Fix warnings
2b2cfdac Update docs
99744f8f Suppress unfixable warning
f5fe8492 Specialize formatter for chrono durations
a5a9805a First stub at the datetime format parser
645c76a9 Fix dummy warnings
fecb2d6f Eliminate msvc compiler warnings (#931)
64690d3a Add context_base::arg()
01640f44 Fully qualify dummy_int (#941)
e37d6a98 add make_printf_args and make_wprintf_args functions (#934)
982ee5c6 parse_context -> format_parse_context
b7b85485 thousands_sep -> thousands_sep_impl (#939)
00a8cc83 Fix formatting
33fbb3a7 Fix remaining linker errors.
bd612159 Disable fmt-impl-test in windows + shared lib.
702b3d16 Fix link error in windows with shared library.
9d4ef943 Install pdb files.
6c95fb35 Default Context to format_context
16b78ee6 fix incompatibilities with c++2a mode in clang
19e00887 More locale support
f2ee9881 Improve locale support
1385050e More formatter tests
03c1b110 Fix gcc 4.4 build
cc805c61 Test enabled formatters
e0157923 Disallow leading zeros in arg-id
34030dec Cleanup warning flags
6b26e3f2 Manifest & Gradle comment
d286c977 Update for Gradle build
d951f6df Get latest Gradle (ver. 4.10.2)
a23d5924 Fix check_format_string (#925)
36161284 Update docs
38f355d8 Revert "find sphinx-build before calling build.py"
324eac1a Make locales work with any character type
bdda4d60 Simplify compile-time strings
5ee1a4bc check for property 'mutable iterator' and SFINAE on it
2dea780f change type naming and fix sfinae bug
b98e8301 add non-char support for compile-time format check
ccd3e8bb Make is_constructible public (#918)
43731538 Update usage.rst
73cfd8f3 Fix colored print
ec384302 additional test for print with background color
0a96c032 Parameterize v*printf on string type (#920)
61e6d2e3 Fix core version of vformat_to
ea4010d7 Merge has_to_string_view into is_string
486fff59 Add sprintf_format instantiations and remove syntactic noise
1e3dcbba fix: 'format_to_n' compiles 'std::back_inserter' arguments
f0328f8e Use char_traits::length in string_view ctor (#914)
895fb984 Disallow gcc 4.4 failures
20c708bf Fix build on gcc 4.4
9d0c9c4b cmake: output share/fmt.pc
2d2326a7 Fix compilation with older gcc
1ec02723 Get rid of FMT_UNION
2c81c851 Adapt any string-like type to be used by {fmt} just like the standard string types already supported. The adaption is totally non-intrusive.
846c644e Workeround broken sprintf in MSVC
13d472bd Compute output size for grisu
b71d3fe7 Remove use_grisu
847abb6f Fix test
dda47c94 Merge min_digits and max_digits
29246221 Fix naming of basic_format_specs members
bda5f9a5 Replace grisu2_specs with core_format_specs
b1ca608b Remove unused empty_spec
e8efdef8 Avoid extra copy
98f1c1fe Remove unused code
50b18a3c Integrate Grisu
69929752 Implement Grisu rounding
4bb76ef0 Remove redundant definition of print
ddd7caf3 Fix locale-dependent formatting (#905)
10e03e69 use found python executable for launching sphinx-build
07200f44 find sphinx-build before calling build.py
08a65c22 Workaround broken constexpr in MSVC2017
167f8fe3 Fix a typo in api.rst
57983423 Remove signbit workaround
7bebb3e1 Clarify overload resolution in docs
939fbe55 Remove basic_fixed_buffer.
61f81a07 minor documentation corrections
f27defc6 Parameterize printf functions on the type of the format string.
6a685571 Make 'std::*::basic_string_view' a valid argument type for 'format_str' parameters.
87a0408c Fix ostream.h build
2b5acad4 Remove redundant size argument to write_padded
655ce533 is_format_string -> is_string
fea712ab Parameterize ostream functions on the type of the format string.
f16a118e Fix non-matching char types.
041bf83d Improve fmt::format readability
22990323 Document how to write a formatter for a type hierarchy
f5480635 visit -> visit_format_arg
cdf3fa08 Put related code together in fmt/core.h
38325248 Count width in code points (#628)
deb901b9 Parameterize core functions on the type of the format string.
0f98de30 Update docs
c797708f Workaround strlen being non-constexpr in ARM toolchain
49b4c1e9 Update docs
63a87beb Add to_string_view
4e0c3146 checked_format_args -> checked_args
c3538a1e Simplify variadic functions further
2d7d0835 Simplify variadic functions
3f4cfa6c Implement UTF-8 string support
f8027414 Impelement char8_t support
76a47d41 Cleanup the use of FMT_CHAR
267fdc7a Parameterize core functions on the type of the format string.
5bced124 Parameterize more functions on string type
674999c5 fix vs2017 warning fmt::v5::localtime 'not all control paths return a value'.
e4fea22d Make char8_t a strongly-typed enum
66992e90 Clarify that writing to memory_buffer appends (#877)
e864acfd Fix compilation with intel compilers (ICC/ICPC) v14.0
4cf21f58 constrain templated format_to on proper format string type.
d7f17613 Fix compilation on platforms with exotic double (#878)
e4ca37cc Parameterize format_to on string type (#880)
d66fa221 Reduce syntactic noise
48e6dcd0 Implement workarounds for gcc 4.4
0ea3221d Remove is_named_arg and add FMT_CHAR
73c53d78 Parameterize 'printf(rgb color, ...)' and 'vprint_rgb(rgb color, ...)' on the type of the format string.
d41be23a Simplify string_view detection
2def9e4c Remove FMT_DTOR_NOEXCEPT
ff6e46ed More cleanup
715f2b4c Remove require_wchar and internalize no_formatter_error
ec0cdc46 Workaround Windows slowness

git-subtree-dir: externals/fmt
git-subtree-split: 9e554999ce02cf86fcdfe74fe740c4fe3f5a56d5
2019-03-24 14:24:09 -04:00
Lioncash
1957180595 Squashed 'externals/xbyak/' changes from f72646a7..4a6fac8a
4a6fac8a update version to 5.77
801cf3fd cosmetic change of getNumCores
d397e824 fix number of cores that share LLC cache
a669e092 support non-intel-cpu visual studio
af5f422e Merge branch 'fenghaitao-guard_x86' into develop
9b98dc17 Guard x86 specific codes with "#if defined(__i386__) || defined(__x86_64__)"
dd4173e1 move some member variables input private

git-subtree-dir: externals/xbyak
git-subtree-split: 4a6fac8ade404f667b94170f713367fe7da2a852
2019-03-24 14:20:49 -04:00
Lioncash
12b783918b
externals: Update catch to 2.7.0
Keeps the unit testing library up to date.
2019-03-24 14:02:24 -04:00
MerryMage
a1f642f838 emit_x64_floating_point: F16C implementation of FPSingleToHalf 2019-03-24 15:42:14 +00:00
MerryMage
2a5b4f4933 emit_x64_floating_point: F16C implementation of FPHalfToSingle and FPHalfToDouble 2019-03-24 11:42:22 +00:00
MerryMage
59887e8b62 emit_x64_floating_point: Factor out ConvertRoundingModeToX64Immediate 2019-03-24 11:28:04 +00:00
MerryMage
16a40b3b9d backend/x64: Expose FPCR in EmitContext instead of its subcomponents 2019-03-24 11:28:04 +00:00
Merry
d5263c17cb
Merge pull request #458 from lioncash/float-op
A64: Handle half-precision floating point in FABS, FNEG, and scalar FMOV
2019-03-24 11:23:21 +00:00
Merry
42ae48e768
Merge pull request #457 from lioncash/fpconv
A64: Handle half-precision floating point in floating-point FCVT, FCVTL, and FCVTN
2019-03-23 20:59:20 +00:00
Lioncash
f12b0f926c
A64: Handle half-precision floating point in FCVTL
Like FCVTN, now that we have half-precision floating point conversion
functions available, we can go ahead and use those to eliminate the
interpreter fallback.
2019-03-23 14:16:44 -04:00
Lioncash
d4d642198c
A64: Handle half-precision floating point in FCVTN
Now that we have IR instructions for performing conversions with
half-precision floating point, we can also handle half-precision values
within FCVTN.
2019-03-23 14:16:44 -04:00
Lioncash
ede3d7284a
A64: Enable FCVT floating-point conversions for half-precision
With this, we no longer have to fall back to the interpreter in any of
the FCVT floating-point conversion instructions.
2019-03-23 14:16:44 -04:00
Lioncash
eb09ae27db
frontend/ir_emitter: Add half->{single, double} and {double, single}->half conversion opcodes 2019-03-23 14:16:44 -04:00
Lioncash
f74c9dad6f
common/fp/unpacked: Amend behavior of FPUnpackCV
This is supposed to call FPUnpackBase instead of FPUnpack. This would
result in alternate half-precision representations being misinterpreted
when it comes to dealing with NaNs.
2019-03-23 14:16:44 -04:00
Lioncash
36e739ba9b
common/fp/op/FPConvert: Amend off-by one in double NaN case in FPConvertNaN
Avoids potentially clobbering the intended sign bit value during
conversions to double-precision values. The other conversion types are
already properly handled, so those don't need to be addressed.
2019-03-23 14:16:44 -04:00
Lioncash
29e1a024c7
common/fp/op/FPConvert: Add half-precision instantiations to FPConvert 2019-03-23 14:16:37 -04:00
Lioncash
d59cff531c
A64: Handle half-precision floating point in scalar FMOV
This is simply performing a scalar value transfer between registers
without conversions, so this is trivial to handle as-is.
2019-03-23 13:46:47 -04:00
Lioncash
5196e94792
A64: Handle half-precision floating point in scalar FABS
Now that we have the half-precision variant of the opcode added, we can
simply handle the instruction instead of treating it as undefined.
2019-03-23 13:39:23 -04:00
Lioncash
c75f73785d
frontend/ir_emitter: Add half-precision variant of FPAbs 2019-03-23 13:38:09 -04:00
Lioncash
b772cb7c5a
A64: Handle half-precision floating point in scalar FNEG
With the half-precision variant of the FPNeg opcode added, we can
utilize it here to emulate the half-precision variant of FNEG.
2019-03-23 13:23:34 -04:00
Lioncash
fd71df5efd
frontend/ir_emitter: Add half-precision variant of FPNeg 2019-03-23 13:21:59 -04:00
Merry
0f2f6ef789
Merge pull request #456 from lioncash/mov
A64: Enable FMOV (general) for half-precision floating point
2019-03-22 22:27:48 +00:00
Lioncash
7627fa389b
A64: Enable FMOV (general) for half-precision floating point
This just transfers values between vector registers and general-purpose
registers with no conversions performed, so this is trivial to add
support for half-precision to.
2019-03-22 15:18:12 -04:00
Merry
004adfe844
Merge pull request #455 from lioncash/sqrdmulh-scalar
A64: Implement SQRDMULH and SQDMULL's scalar indexed variants
2019-03-22 12:43:53 +00:00
Merry
a3a41a91cd
Merge pull request #454 from lioncash/sqrdmulh
A64: Implement SQRDMULH and SQDMULL{2}'s vector indexed element variants
2019-03-21 19:14:30 +00:00
Lioncash
5c6becc402
A64: Implement SQRDMULH's scalar indexed element variant 2019-03-20 23:26:55 -04:00
Lioncash
2d78390d43
A64: Implement SQDMULL{2}'s scalar indexed element variant 2019-03-20 23:05:07 -04:00
Lioncash
3238864878
simd_scalar_x_indexed_element: Factor out index and Vm argument construction
This will be useful in the implementations of SQRDMULH and SQDMULL{2} as
well.
2019-03-20 22:28:46 -04:00
Lioncash
996a618643
simd_vector_x_indexed_element: Deduplicate index and Vm operand construction 2019-03-20 16:21:48 -04:00
Lioncash
328211b0c5
A64: Implement SQDMULL{2}'s by-element variant 2019-03-20 15:36:27 -04:00
Lioncash
b4ca6b67d1
A64: Implement SQRDMULH's by-index vector variant 2019-03-20 14:05:41 -04:00
Merry
6e8b7d27ec
Merge pull request #452 from lioncash/frecpx
A64: Implement FRECPX's half-precision floating-point variant
2019-03-10 20:43:55 +00:00
Lioncash
f8ad1819ab
A64: Implement FRECPX's half-precision floating point variant 2019-03-09 20:08:01 -05:00
Lioncash
db67a42244
frontend/ir/ir_emitter: Amend FPRecipExponent to handle half-precision floating point 2019-03-09 20:08:01 -05:00
Lioncash
8036a54a74
frontend/ir/value: Add U16U32U64 type to represent floating point types 2019-03-09 20:08:01 -05:00
Lioncash
1e0933907a
common/fp/op/FPRecipExponent: Add half-precision floating point specialization 2019-03-09 20:07:53 -05:00
Lioncash
5117997cde
common/fp/unpacked: Correct edge-cases within FPUnpack for half-precision floating point
This corrects one case where floating-point exceptions could be set when
they're not supposed to be.

This also corrects a case where values were being treated as NaNs when
they weren't supposed to be.
2019-03-09 19:21:16 -05:00
Merry
d3e242b4af
Merge pull request #451 from lioncash/unpck
common/fp: Minor adjustments for half-precision floating point support
2019-03-09 16:05:42 +00:00
Lioncash
1b66e43094
common/fp/process_nan: Add half-precision instantiations for NaN processing functions 2019-03-09 02:26:58 -05:00
Lioncash
2f7f75ff09
common/fp/unpacked: Add half-precision instantiation of FPRoundBase 2019-03-09 02:26:47 -05:00
Lioncash
74e230de9d
common/fp/unpacked: Handle half-precision unpacking in FPUnpackBase 2019-03-09 01:19:55 -05:00
Lioncash
9c96c4c9fc
common/fp/unpacked: Adjust FPUnpack to operate like ARM pseudocode
This function is defined as always disabling the AHP bit in the fpcr
before performing any operations.

At the same time, rename the original FPUnpack function to FPUnpackBase
to match the pseudocode in the ARM reference manual.
2019-03-09 00:08:12 -05:00
Merry
c535f4bf89
Merge pull request #448 from lioncash/saturate
A64: Implement SQSHRN, SQSHRUN, and UQSHRN's scalar variants
2019-03-08 18:50:18 +00:00
Merry
b3d6f40dbb
Merge pull request #449 from lioncash/hp
common/fp/info: Add specialization of FPInfo for half-precision floating point
2019-03-08 18:49:18 +00:00
Merry
d2fbcc6dde
Merge pull request #450 from lioncash/cv
common/fp/unpacked: Add FPRoundCV and FPUnpackCV
2019-03-08 12:05:52 +00:00
Lioncash
6dad779547
common/fp/unpacked: Add FPRoundCV
Corresponds to the equivalent pseudocode within the ARMv8 reference
manual. This will be necessary for supporting half-precision
floating-point.

This also makes use of it within FPConvert
2019-03-08 06:24:54 -05:00
Lioncash
deca5e5dae
common/fp/unpacked: Add FPUnpackCV
Adds a template function that performs the same behavior as in the ARM
pseudocode, and utilizes it in FPConvert, which will be necessary for
half-float support.
2019-03-08 06:20:54 -05:00
Lioncash
d1a1434af6
common/fp/info: Add specialization of FPInfo for half-precision floating point
Puts the necessary info struct in place for further use.
2019-03-08 03:50:48 -05:00
Lioncash
203678bd9e
A64: Implement SQSHRN, SQSHRUN, and UQSHRN's scalar variants
These can just be implemented in terms of the vector variants for the
time being.
2019-03-08 03:23:56 -05:00
Lioncash
fb3847b044
A64: Amend prototypes of some SIMD scalar shift by immediate opcodes
These take a vector for a destination.
2019-03-08 00:20:24 -05:00
Merry
40339b1278
Merge pull request #447 from lioncash/flag
A64: Implement CFINV, RMIF, AXFlag and XAFlag
2019-03-07 16:17:13 +00:00
Lioncash
8d115ae80d
ir_opt/a64_get_set_elimination_pass: Add handling for NZCV raw get and set operations 2019-03-07 03:57:18 -05:00
Lioncash
5b66ae2a5a
A64: Implement AXFlag and XAFlag 2019-03-06 18:39:19 -05:00
Lioncash
080d163d39
A64: Implement RMIF 2019-03-06 18:39:19 -05:00
Lioncash
9cd84c5149
A64: Implement CFINV 2019-03-06 18:39:12 -05:00
Merry
04f09eb644
Merge pull request #442 from lioncash/fcvtxn
A64: Implement scalar and vector variants of FCVTXN
2019-03-06 20:27:59 +00:00
Lioncash
27af30d7c3
ir: Add A64-specific opcodes for getting and setting raw NZCV values
This will be necessary to implement the flag manipulation and flag
format instructions.
2019-03-06 14:17:27 -05:00
Lioncash
cdfdd95e63
A64: Implement the vector version of FCVTXN 2019-03-06 12:05:24 -05:00
Lioncash
e3ba07971e
A64: Implement the scalar version of FCVTXN 2019-03-06 12:05:24 -05:00
Lioncash
f44cafe3ca
frontend/ir/ir_emitter: Alter parameters of FPDoubleToSingle() and FPSingleToDouble() to pass along desired rounding mode
This will be necessary to special-case the non-IEEE Von Neumann rounding
to odd rounding mode.
2019-03-06 12:05:20 -05:00
Merry
d0ae8dcf97
Merge pull request #446 from lioncash/sqshl
A64: Implement scalar variants of SQSHL (register) and UQSHL (register)
2019-03-06 14:14:41 +00:00
Merry
948984bc94
Merge pull request #445 from lioncash/sqrt
A64: Implement single and double-precision vector variant of FSQRT
2019-03-06 14:14:21 +00:00
Merry
768a2a6973
Merge pull request #443 from lioncash/flag
A64: Rearrange flag format/manipulation instructions
2019-03-06 14:13:59 +00:00
Merry
a5ce4c7831
Merge pull request #441 from lioncash/constexpr
common/bit_util: Mark a few functions as constexpr
2019-03-05 19:57:12 +00:00
Merry
fa1671b655
Merge pull request #440 from lioncash/include
common/fp: Remove unnecessary includes
2019-03-05 19:56:58 +00:00
Merry
ecd544098b
Merge pull request #444 from lioncash/interpret
A64: Fall back to interpreting for FCADD and FCMLA half-precision variants
2019-03-05 18:51:50 +00:00
Lioncash
4429a0c8e5
A64: Implement UQSHL (register)'s scalar variant
This can be implemented in terms of the vector variant.
2019-03-04 14:26:25 -05:00
Lioncash
a3eeb334fa
A64: Implement SQSHL (register)'s scalar variant
We can implement this in terms of the vector variant.
2019-03-04 14:26:20 -05:00
Lioncash
16e6a8f343
A64: Implement single and double-precision vector variant of FSQRT 2019-03-04 13:37:27 -05:00
Lioncash
3e5a52cc66
frontend/ir: Add opcodes for vector square roots 2019-03-04 13:24:36 -05:00
Lioncash
d365d4083a
A64: Fall back to interpreting for FCADD and FCMLA half-precision variants
Rather than straight-up treating them as undefined, we can fall back to an
interpreter in this case.
2019-03-04 12:23:57 -05:00
Lioncash
36eba63641
A64: Rearrange flag format/manipulation instructions
Gives these instructions better categorical labeling.
2019-03-04 12:08:49 -05:00
Lioncash
9426cc9795
common/fp/op: Add FP conversion functions 2019-03-04 11:57:41 -05:00
Lioncash
7ae37bcc64
frontend/ir/microinstruction: Add missing cases for FPRecipExponent{32,64} for ReadsFromAndWritesToFPSRCumulativeExceptionBits()
This was intended to be added within #437, but was missed
2019-03-04 09:43:48 -05:00
Lioncash
e042c63de6
common/bit_util: Make a few functions as constexpr
These four functions can be made constexpr with no issue.
2019-03-04 09:21:29 -05:00
Lioncash
f01fca3bc3
common/fp: Remove unnecessary includes 2019-03-04 08:25:48 -05:00
Merry
f2fb7db668
Merge pull request #439 from lioncash/fcmla
A64: Implement FCADD and FCMLA
2019-03-03 14:43:22 +00:00
Merry
73e230aa3f
Merge pull request #438 from lioncash/fmulx
A64: Implement scalar double/single precision FMULX (by element)
2019-03-03 14:42:45 +00:00
Merry
456f2ec49f
Merge pull request #437 from lioncash/frecpx
A64: Implement FRECPX (single, double precision)
2019-03-03 14:42:23 +00:00
Merry
8be7648e79
Merge pull request #436 from lioncash/no-alloc
A64: Implement LDNP/STNP
2019-03-03 14:40:57 +00:00
Merry
4f88bf352f
Merge pull request #435 from lioncash/a32
tests/a32/testenv: Make A32TestEnv's code_mem member a std::vector
2019-03-03 12:59:36 +00:00
Merry
36fbe8de86
Merge pull request #434 from lioncash/format
A32/translate_arm: Formatting/tidying up
2019-03-03 12:58:03 +00:00
Lioncash
dae46f0132
A64: Implement FRECPX (single, double precision) 2019-03-02 23:31:30 -05:00
Lioncash
7b004e7230
frontend/ir/ir_emitter: Add opcodes for floating point reciprocal exponents 2019-03-02 23:31:30 -05:00
Lioncash
78742a6aea
common/fp/op: Add operations for floating-point reciprocal exponents 2019-03-02 23:31:26 -05:00
Lioncash
9f556b8447
A64: Implement FCMLA 2019-03-02 22:50:17 -05:00
Lioncash
0d9cca04c0
A64: Implement FCADD 2019-03-02 22:49:57 -05:00
Lioncash
ccc3d5258e
A64: Implement scalar double/single precision FMULX (by element) 2019-03-02 21:12:09 -05:00
Lioncash
fc111fda0c
A64: Implement LDNP/STNP
LDNP and STNP indicate that a memory access is non-temporal/streaming
(i.e. unlikely to be repeated), allowing data caching to not be
performed. However, given this is only a hint, we can treat these two
instructions as regular LDP and STP instructions for the time being.
2019-03-02 17:41:09 -05:00
Lioncash
5c11851f33
tests/a32/testenv: Make A32TestEnv's code_mem member a std::vector
Makes the data member consistent with the A64 test environment.
2019-03-02 16:26:37 -05:00
Merry
48cc7274c1
Merge pull request #433 from lioncash/unicorn
tests/unicorn_emu: Add getters and setters for PC/SP
2019-03-01 22:03:20 +00:00
Merry
468aba4ccd
Merge pull request #432 from lioncash/catch
externals: Update Catch to 2.6.1
2019-03-01 21:58:06 +00:00
Merry
8f4ea28988
Merge pull request #431 from lioncash/noexcept
backend/x64/a32_interface: Mark Context move constructor and move assignment as noexcept
2019-03-01 21:57:48 +00:00
Lioncash
02a70f3be1
translate_arm/coprocessor: Minor tidying up 2019-03-01 03:15:43 -05:00
Lioncash
c1f4241ca8
translate_arm/vfp2: Invert conditionals where applicable 2019-03-01 03:10:18 -05:00
Lioncash
797fca0125
translate_arm/synchronization: Invert conditionals where applicable 2019-03-01 02:23:24 -05:00
Lioncash
6a851dc412
translate_arm/status_register_access: Invert conditionals where applicable 2019-03-01 02:11:05 -05:00
Lioncash
18276e7c66
translate_arm/saturated: Invert conditionals where applicable 2019-03-01 02:05:30 -05:00
Lioncash
55fff7b2f6
translate_arm/reversal: Invert conditionals where applicable 2019-03-01 01:51:47 -05:00
Lioncash
a6a9fbcc48
translate_arm/parallel: Invert conditionals where applicable 2019-03-01 01:49:30 -05:00
Lioncash
b970daf983
translate_arm/packing: Invert conditionals where applicable 2019-03-01 01:23:48 -05:00
Lioncash
3b1133ad13
translate_arm/multiply: Invert conditionals where applicable 2019-03-01 01:21:00 -05:00
Lioncash
e71e560673
translate_arm/misc: Invert conditionals where applicable 2019-03-01 00:58:47 -05:00
Lioncash
83daf1c50e
translate_arm/load_store: Invert conditionals where applicable 2019-03-01 00:56:52 -05:00
Lioncash
3706f58083
translate_arm/extension: Invert conditionals where applicable 2019-03-01 00:31:46 -05:00
Lioncash
ef37cebb71
translate_arm/exception_generating: Invert conditionals where applicable 2019-03-01 00:22:45 -05:00
Lioncash
b613045b38
translate_arm/data_processing: Invert conditionals where applicable 2019-03-01 00:20:08 -05:00
Lioncash
a71a2b3b89
translate_arm/branch: Invert conditionals where applicable
Allows unindenting code a bit.
2019-02-28 23:35:01 -05:00
Lioncash
c63dfa7409
tests/unicorn_emu: Add getters and setters for PC/SP
Makes the interface consistent with the A64Unicorn class.
2019-02-28 23:12:13 -05:00
Lioncash
22c946ebcc
externals: Update Catch to 2.6.1
Keeps the unit testing library up to date.
2019-02-28 22:57:18 -05:00
Lioncash
82be728033
backend/x64/a32_interface: Mark Context move constructor and move assignment as noexcept
Provides a more "correct" move constructor/assignment operator, since
these relevant functions shouldn't throw exceptions.

Has the benefit of playing nicely with std::move_if_noexcept and other
noexcept library facilities.
2019-02-27 10:47:47 -05:00
Merry
555ae3e809
Merge pull request #430 from lioncash/unused
block_of_code: Replace cast with [[maybe_unused]] in DoesCpuSupport()
2019-02-23 11:37:35 +00:00
Lioncash
0be97f3ecc
block_of_code: Replace cast with [[maybe_unused]] in DoesCpuSupport() 2019-02-22 22:46:06 -05:00
Merry
767665bcef
Merge pull request #428 from lioncash/unused
common: Remove address_range.h
2019-02-08 21:55:22 +00:00
Lioncash
ab4b82167f
externals/xbyak: Update xbyak to 5.76
Keeps the external library up to date.
2019-02-08 12:58:59 -05:00
Lioncash
cc67312fed Squashed 'externals/xbyak/' changes from 42462ef9..f72646a7
f72646a7 update version
4612528f format change
4b95e862 Merge branch 'shelleygoel-master'
4c262fa6 add functionality to get num of cores using x2APIC ID
bc70e7e1 recover Xbyak::CastTo
d09a230f unlink Label when LabelManager is destroyed
973e8597 update version
afdb9fe9 Xbyak::CastTo is removed
b011aca4 add RegRip +/- int
acae93cd increase max temp regs for StackFrame
ea4e3562 util::StackFrame uses push/pop instead of mov

git-subtree-dir: externals/xbyak
git-subtree-split: f72646a7c817885d7fd29abe6f1f5b50dd621ef6
2019-02-08 12:58:53 -05:00
Lioncash
18f5916e4d
common: Remove address_range.h
The AddressRange structure isn't used anywhere within the codebase, so
this can be removed. Particularly because there's no real appeal/heavy
potential use of it in the future that isn't trivial to add back if
needed.
2019-02-08 09:41:37 -05:00
Merry
5c57df39ad
Merge pull request #426 from lioncash/const
frontend/{A32, A64}/ir_emitter: Mark PC() and AlignPC() as const-qualified member functions
2019-02-07 20:03:30 +00:00
Merry
f624867d5a
Merge pull request #427 from lioncash/include
tests/A32/fuzz_arm: Remove unused Unix-specific include
2019-02-07 20:03:17 +00:00
Lioncash
7593eadc2e
tests/A32/fuzz_arm: Remove unused Unix-specific include
This was introduced within 6f6f60c61b2137780102c75841441f760d3cc3fc,
however, the relevant code that it was used with has since been removed,
making the include unnecessary.
2019-02-05 20:59:24 -05:00
Lioncash
67c39ec79b
frontend/A32/ir_emitter: Mark PC() and AlignPC() as const-qualified member functions
These don't modify instance state, so they can be const-qualified member
functions.
2019-02-05 20:21:48 -05:00
Lioncash
539fda5350
frontend/A64/ir_emitter: Mark PC() and AlignPC() as const qualified member functions
These don't actually alter any instance state.
2019-02-05 20:21:44 -05:00
Annomatg
735e6c58be Reduce Inst::NumArgs calls / opcodes: Prefer std::vector to std::map (#425)
* Don't call Inst::NumArgs in a loop conditional
* opcodes: Prefer a simple std::vector instead of a std::map
2019-02-03 20:21:14 +00:00
Merry
7957066968
Merge pull request #423 from lioncash/catch
externals: Update catch to v2.5.0
2019-02-02 22:59:54 +00:00
Merry
58bc4bcd3c
Merge pull request #422 from lioncash/truncate
a32_unicorn: Silence a truncation warning within UnmappedMemoryHook()
2019-02-02 22:59:41 +00:00
Merry
dced81eec0
Merge pull request #421 from lioncash/comma
tests/.../vfp_helper: Amend use of the comma operator
2019-02-02 22:59:27 +00:00
Mat M
6cdb4e3d8c
Merge pull request #424 from meme/readme
Correct README (`jit` to `cpu`)
2019-02-01 00:31:35 -05:00
meme
23eeb5ebae Correct README (jit to cpu) 2019-01-31 12:53:00 -05:00
Lioncash
69eec29993
externals: Update catch to v2.5.0
Keeps the unit testing library up to date.
2019-01-28 08:51:03 -05:00
Lioncash
6e54c8f8c8
tests/.../vfp_helper: Amend use of the comma operator
Makes the lines of code slightly nicer to read
2019-01-22 19:06:11 -05:00
Lioncash
91e82bb615
a32_unicorn: Silence a truncation warning within UnmappedMemoryHook()
MemoryRead8() takes a u32, but we were passing the result of a

u32 + size_t operation, which is 64-bit on 64-bit platforms. This
results in a truncation warning
2019-01-22 19:05:42 -05:00
Merry
6598d2147e
Merge pull request #419 from lioncash/fold-op
constant_propagation_pass: Fold byte reversal opcodes where applicable
2018-11-25 09:50:56 +00:00
Lioncash
70a392af9e
constant_propagation_pass: Fold byte reversal opcodes where applicable
These are reasonably trivial to fold away when applicable. We just
perform the swap and replace the instruction with the constant value.
2018-11-24 18:11:08 -05:00
Merry
79d51f8d4a
Merge pull request #418 from lioncash/fold-op
constant_propagation_pass: Handle folding for Least/MostSignificant{Bit, Byte, Half, Word} opcodes
2018-11-24 12:45:26 +00:00
Merry
607b2f98ee
Merge pull request #417 from lioncash/swap
common: Move byte swapping functions to bit_utils.h
2018-11-24 12:44:41 +00:00
Merry
230dcdab4b
Merge pull request #416 from lioncash/space
dynarmic_tests: Remove inconsistent spacing
2018-11-24 12:44:19 +00:00
Merry
bd8c467132
Merge pull request #415 from lioncash/alloc
a64_emit_x64: Convert std::vector instances in GenFastmemFallbacks() to std::array
2018-11-24 12:44:08 +00:00
Merry
6eeec2f9d0
Merge pull request #414 from lioncash/retval
fuzz_util: Simplify result return in InstructionGenerator's Generate() function
2018-11-24 12:43:40 +00:00
Lioncash
043cace402
constant_propagation_pass: Handle folding for Least/MostSignificant{Bit, Byte, Half, Word} opcodes
These are quite trivial to fold.
2018-11-23 23:11:00 -05:00
Lioncash
75b8308cef
common: Move byte swapping functions to bit_utils.h
These are quite general functions, so they can just be moved into common
instead of recreating a namespace here.
2018-11-23 22:50:41 -05:00
Lioncash
4e4e1d315c
dynarmic_tests: Remove inconsistent spacing
Makes the changed code more consistent with the surrounding code.
2018-11-23 21:49:57 -05:00
Lioncash
54aac80504
a64_emit_x64: Make constness of loop elements explicit within GenFastmemFallbacks() 2018-11-23 20:12:55 -05:00
Lioncash
4763bb706e
a64_emit_x64: Convert std::vector instances in GenFastmemFallbacks() to std::array
Given these are quite small, we can avoid the need to heap allocate
here.
2018-11-23 20:11:12 -05:00
Lioncash
d7af990350
fuzz_util: Simplify result return in InstructionGenerator's Generate() function
This can just be a simple direct return without a separated declaration
and assignment.
2018-11-23 19:55:32 -05:00
MerryMage
b781237151 emit_x64_vector_floating_point: AVX && DN implementation of EmitFPVectorMulX 2018-11-18 10:03:13 +00:00
MerryMage
e9acec2091 A64: Implement FMULX (by element), single and double precision variants 2018-11-17 21:51:39 +00:00
MerryMage
ea0c1919bb A64: Implement FMULX, vector single-precision and double-precision variant 2018-11-17 21:32:12 +00:00
MerryMage
333d3b734d IR: Implement FPVectorMulX 2018-11-17 21:31:22 +00:00
Michał Janiszewski
af96812b47 Provide justification for always-true condition (#412) 2018-11-02 19:36:30 +00:00
Michał Janiszewski
4295f727cd Enable ninja and ccache on travis (#413)
* Use ninja, the fast build system

Make is known to be rather slow, but it's possible to generate other
build system files with CMake, so use a faster one.

* Use ccache on Travis

* Dummy commit to test ccache
2018-11-01 12:33:45 +00:00
Merry
a5f35d45f0
Merge pull request #411 from janisozaur/include-guards
Add missing include guards
2018-11-01 12:33:09 +00:00
Michał Janiszewski
a695635efd Add missing include guards 2018-10-31 22:54:17 +01:00
Merry
52e646408f
Merge pull request #409 from VPeruS/switch-optional
Switch boost::optional to std::optional
2018-10-24 18:49:49 +01:00
V.Kalyuzhny
05a2dbfce0 Switch boost::optional to std::optional 2018-10-24 15:02:39 +00:00
Merry
409ff8d78e
Merge pull request #410 from lioncash/catch
externals: Update catch to v2.4.1
2018-10-24 07:32:38 +01:00
Lioncash
1c0bed959d
externals: Update catch to v2.4.1
Keeps the unit testing library up to date.
2018-10-23 18:10:58 -04:00
Merry
d0bcca81a8
Merge pull request #408 from lioncash/shift
constant_propagation_pass: Add 64-bit variants of shifts to the pass
2018-10-12 20:22:29 +01:00
Lioncash
2c8c83c2f1
constant_propagation_pass: Add 64-bit variants of shifts to the pass
These optimizations can also apply to the 64-bit variants of the shift
opcodes; we just need to check if the instruction has an associated
pseudo-op before performing the 32-bit variant's specifics.

While we're at it, we can also relocate the code to its own function
like the rest of the cases to keep organization consistent.
2018-10-12 14:50:21 -04:00
Merry
fc051d2c5c
Merge pull request #407 from lioncash/div
constant_propagation_pass: Fold division operations where applicable
2018-10-11 15:50:47 +01:00
Lioncash
b55b7a5c7f
constant_propagation_pass: Fold division operations where applicable
We can fold division operations if:

1. The divisor is zero, then we can replace the result with zero (as this is how
ARM platforms expect it).
2. Both values are known, in which case we can just do the operation and
store the result
3. The divisor is 1, in which case just return the other operand.
2018-10-09 16:03:47 -04:00
Merry
c3a1558dfc
Merge pull request #406 from lioncash/mul
constant_propagation_pass: Fold Mul32 and Mul64 cases where applicable
2018-10-09 15:11:36 +01:00
Merry
caea0460ca
Merge pull request #405 from lioncash/inst
a64: Add ARMv8.4+ instructions encodings to the encoding table
2018-10-08 08:35:04 +01:00
Lioncash
a5d1d27c8c
constant_propagation_pass: deduplicate common 32/64 bit checking for results in folding functions
It's common for an folding operation to apply to both the 32-bit and
64-bit variant of the same opcode, which leads to checking which kind of
result we need to store the value as. This moves it to its own function,
so that we don't need to duplicate it in various functions.
2018-10-07 22:16:40 -04:00
Lioncash
a0ea3a566a
constant_propagation_pass: Fold Mul32 and Mul64 cases where applicable
Multiplication operations can currently be folded if:

1. Both arguments are known constant values
2. Either operand is zero (in which case the result is also zero)
3. Either operand is one (in which case the result is the non-one
operand).
2018-10-07 22:16:01 -04:00
Merry
e6ccf2e79d
Merge pull request #404 from lioncash/fold
constant_propagation_pass: Extend folding of sign-extension/zero-extension opcodes
2018-10-07 16:40:11 +01:00
Lioncash
62a2ba7981
a64: Add ARMv8.4+ instructions encodings to the encoding table
Keeps the table up to date with the ARM specification.
2018-10-06 02:27:50 -04:00
Lioncash
f1d907c980
constant_propagation_pass: Fold SignExtend{Type}ToLong opcodes if possible 2018-10-05 21:06:57 -04:00
Lioncash
4f03ca65a0
constant_propagation_pass: Fold SignExtend{Type}ToWord opcodes if possible 2018-10-05 21:06:57 -04:00
Lioncash
f47c5e4ede
constant_propagation_pass: Fold ZeroExtend{Type}ToLong opcodes if possible
These are equivalent to the ZeroExtendXToWord variants, so we can
trivially do this as well.
2018-10-05 21:06:57 -04:00
Lioncash
e0eec323f2
constant_propagation_pass: Combine zero-extension folding code into its own function
Separates the behavior from the actual switch statement and gets rid of
duplication, now that we can use the general GetImmediateAsU64()
function.
2018-10-05 21:06:54 -04:00
Merry
86539d97d3
Merge pull request #403 from lioncash/zero
Add several convenience functions to the Value class
2018-10-04 17:57:11 +01:00
Lioncash
8f262d485a
ir/value: Add IsSignedImmediate() and IsUnsignedImmediate() functions to Value's interface
This allows testing against arbitrary values while also simultaneously
eliminating the need to check IsImmediate() all the time in expressions.
2018-10-04 12:33:23 -04:00
Lioncash
01aa5096bf
ir/value: Add a GetImmediateAsS64() function
Provides a signed analogue to GetImmediateAsU64() for consistency with
both integral classes when it comes to signed/unsigned..
2018-10-04 12:33:19 -04:00
Lioncash
d3263fd605
ir/value: Add an IsZero() member function to Value's interface
By far, one of the most common things to check for is whether or not a
value is zero, as it typically allows folding away unnecesary
operations (other close contenders that can help with eliding operations  are 1 and -1).

So instead of requiring a check for an immediate and then actually
retrieving the integral value and checking it, we can wrap it within a
function to make it more convenient.
2018-10-04 05:04:22 -04:00
MerryMage
49041cb451 Squashed 'externals/fmt/' changes from 135ab5cf..3e75ad98
3e75ad98 Update version
4f043f8e Bump version
cc02cbc4 Fix formatting
73c0238e Update changelog
cb122a4d Fix format_to formatting to wmemory_buffer
dc69cc45 Clean tests
9d8021f0 Add checks for NVIDIA's CUDA compiler
9d2221b9 Improve error message when formatting unknown types
70a6a4bb prevent ""fmt/range.h"" from specializing fmt::basic_string_view (#865)
e4fc856c Disable android build due to gradle issues
3f4984fb Clean core-test and fix linkage errors on older gcc
d4366505 Workaround visit lookup issues in printf.h on gcc
894b6fac Changed to use scoped enum
59f555ad Workaround more visit lookup issues on gcc
a7e356cc Update README.rst
e758bfba Merge branch 'release' of github.com:fmtlib/fmt
66381e30 Minor cleanup
295a0d84 Update version
1fb1c4c9 Update docs
465a5935 Add table support to rst2md
d62f4c3b Formatting
a243490a Add more methods to benchmark results
9e12ca60 Update changelog
fbca830d Update changelog, readme and improve compat
6146248c Update changelog
bc26fbf1 Move experimental color API to fmt/color.h
97cc8893 Workaround a visit lookup issue in gcc 8 (#851)
7110b460 Optimize default formatting
c8a8464f Optimize buffer construction
8cbfb6e7 Get rid of conversion warning in gcc-4.8 (#854)
6ffc828a Phasing out null_terminating_iterator
aeb6add3 Skip strchr for the common case
5614289d Optimize and simplify format string parsing
10c7f893 Optimize format string processing on dumb compilers
59c268a5 Use strlen when possible since it's constexpr on gcc
918bb1ce Optimize argument capture
a3ba6b4f Disable the fmt(...) macro by default (#853)
86716894 Update docs and formatting
cc10b460 Make format_to faster on older gcc
981797f0 Get rid of implicit-fallthrough warn. in GCC 7 and 8
21177757 Micro-optimize parsing
be0e2684 Optimize processing of trailing '}'
fbc38b90 Pass heavy arguments by ref
8dc69b9d Workaround a bug in Intellisense
1489d3b7 Implement exponential notation
dd8c5ce4 Implement more FP formatting options
46484da7 Fix a warning
802ff886 Fix compilation of time.h when localtime_t is a macro (#843)
95a71899 Remove conversion compiler warnings (#844)
e483a01a Implement some formatting options in Grisu
f5108091 Revert "Implement some formatting options in Grisu"
2a952dd0 Implement some formatting options in Grisu
0de44a46 Implement exponent formatting
f0d0a1eb Implement Grisu2 digit generation
569ac91e Implement Grisu boundary computation
a11eb3a0 Workaround various icc bugs (#822)
62010520 Disable gnu-string-literal-operator-template warning
98751476 Make convert_to_int public (#818)
ba95e36a Clarify that '\0' cannot be used as fill (#832)
abde38b4 Add compilation support with Newlib nano for embedded targets
18400503 Fix C4127 warning in basic_writer<Range>::write_double
9de31211 Reformat and add a comment
8bbb0b48 Update README.rst
5c0101ab Use the correct function signature in the docs
fbe6410e Fix docs
8b9fb9fb Fix ambiguous instantiation with formatter in fmt/ostream.h (#830)
0f04ec68 Fix package upload (#828)
80907385 Update changelog
5d02041c Update changelog
4b868b89 Re-enable compile-time format-string checking
4061a0d3 Parameterize vformat to support custom char types
c68bab70 Remove broken fmt::internal::format_enum (#818)
0c63d15e Improve wording
ce19309d Workaround a bug in icc 15
c6843491 Move contiguous version of format_to to fmt/core.h
8db14efa util-test -> core-test and minor cleanup
ffe414ca Add compile-time format string checks to format_to (#783)
c178ab44 Remove FMT_USE_RVALUE_REFERENCES
5befe658 Remove fmt/folly.h and clean up core API
35538ca6 Merge more format overloads
4f164097 Merge format overloads using SFINAE
2a4e9488 Add UTF-8 types
d778bded Make line in tests fit within 80chars
7b4f170c Fix warning about using old-style cast
b1d10a28 Add support for dynamic arg sets
cf2719bd Add support for types explicitly convertible to wstring_view
50584f42 Test formatting of an object with templated conversion to string-like
73bed45b Add support for types explicitly convertible to fmt::string_view
6eaa5074 Fix global initialization issue (#807)
48dff9f3 Update docs
a9e26159 Minor cleanup
efd8ee8a Reduce warnings, support #809
8615ff2a Micro-optimize argument retrieval
916ed99d Micro-optimize argument retrieval
e7e9578e Optimize format string parsing
c99a2597 Mark new functions with FMT_API (#808)
e0f6a2f8 Add a formatter for folly::StringPiece
ae4a3945 Revert "Better support for newer CMake's"
a317448b Keep noexcept specifier when exceptions are disabled.
0eb01b83 Better support for newer CMake's
2a4cd6d0 Fix the returned value of `format_to_n` with user-defined types having operator<<.
9c32e73a Fixing return unreachable warning on NVCC
e5c93108 Added clear() to basic_buffer
60c662b3 Add an example of reusing formatters
f66ba650 Optimize format string parsing
f21268aa Revert "Optimize format string parsing" because of a bug in MSVC
07b690a6 Update README.rst
f9e9bf02 Optimize format string parsing
c2ce7e4f Update version
434eb916 Update README.rst
09d94162 Update changelog
e6362642 Fix pedantic conversion warning
f0110e81 Update changelog and CI
479ee2a8 Fix MSVC build, take 2
e928b672 Fix MSVC 2013 build
ec218a3a Fix redefinition warning for RESET_COLOR
c04fb91b Fix handling of user-defined types in format_to (#793)
323b92bf Force linking of inline functions into the library (#795)
c6d9730d Fix sign conversion warnings (#790)
2e95823e Move new color support to format.h and mark old as deprecated
ab2d88ca Make format_to work with basic_memory_buffer (#776)
3abd036c Fix compilation on gcc 4
c2f38054 Add vformat_to_n (#769)
ce500635 Renamed enum color to colors. Added enum colors conversion to rgb struct. Added colors_test.cpp.
0508bbc7 Add wchar_t overload of format_to_n (#764)
c2fbadb9 Fixed issue #779
47268ecd Fixed GCC version test
9ff3b6af Fix handling of compile-time strings when including ostream.h (#768)
e3707ef1 Document that file should be in wide-oriented mode for wide print
45fa4ee9 Merge branch 'master' of github.com:fmtlib/fmt
9c07b37f Using enum class now. Renamed from hex to color. Changed colr names to snake case.
5b5886a9 Fixed line length.
d2bfee13 Added quotes for strings in ranges and tuple likes.
aff6e45e Added support for rgb color output.
1b8a7f8f Fix postincrement in truncating and counting iterators
4bc26f0a Merge branch 'master' of github.com:fmtlib/fmt
fc6e0fe9 Fix FP formatting to a non-back_insert_iterator with sign & numeric alignment (#756)
cd5b5670 Make is_range and is_tuple_like public API, fix #751
6322b47e Minor cleanup
691a7a91 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
dd1a5ef7 Let requests close the file
d5c46259 Fix formatting of more than 15 named arguments (#754)
47d147b6 Simplify the nvcc warning fix
911a7511 Fix nvcc warnings (#752)
94b47628 Fix docs
252f11f8 Fix a bogus MSVC warning about unreachable code, take 2
81d56638 Fix more bogus MSVC warnings about unreachable code (#748)
68f0ac82 Fix a bogus MSVC warning about unreachable code
b60a5c5d Improve floating-point formatting
8dc2360b Fix a comment
4e4b8570 Implement simple version of Grisu
40275579 Fix tests on 64-bit MSVC
5c32aa41 Workaround a bug in MSVC
468c243c Add a function to get cached power of 10
2f257b72 Implement normalization and simplify power table
6a5bb6e2 Move Android.mk to support and update
e282d963 Bump version
e2cd521b Fix incorrect call to on_align in '{:}=' (#750)
fba352a9 Don't use UDL templates on Intel C++ compiler (#742)
6dcc526d Update release script
5386f1df Update version
ba6640b2 Fix formatting
507a50c3 Fix changelog
147807c9 Detect integer_sequence support on MSVC
8b246531 Update changelog
5ad54256 Fix a conflict between fmt::join and fmt/ostream.h (#744)
6ebc1a96 Merge locale.h into format-inl.h
6966db1d Update docs
2196025d Fix a warning
589f5f37 Update changelog
edd5f144 Fix compilation errors on gcc 4.4
936aba5f Fix compilation errors on gcc 4.4
3e3a2774 Update changelog
b76bb796 Improve naming consistency
fbd51534 Update changelog
69823bf8 Improve naming consistency
d940fa67 Disable unsafe implicit conversion to std::string (#729)
d2bf93fe Update changelog
550ef1d2 MSVC improvements and data truncation cleanup.
728e4f5a Fix docs
8c255771 Update docs and changelog
a68fd44e Add ranges.h to FMT_HEADERS in CMakeLists.txt (#738)
e3f7f3a2 Add support for ranges, containers and tuple-like types in fmt/ranges.h
984232db Remove duplicate ChangeLog entries
78677e3f Update ChangeLog and docs
ad23270e Document to_wstring
3c0f8c26 Update ChangeLog
98937893 Detect inline namespaces on gcc
dfb65469 Fix docs
3aa29115 Update ChangeLog.rst
d3f6c841 Update ChangeLog.rst
c1441ae4 Update ChangeLog.rst
dece85b3 Fix docs, take 2
6a1df3bd Fix docs
838400d2 Add inline namespace fmt::v5
b64b24eb Update ChangeLog.rst
fc908711 Update ChangeLog.rst
46c374a8 Fix compilation with new gcc and -std=c++11 (#734)
f0ae7257 Clarify the use of allocators
d72d0462 Update paths in fmt.pro
edbbf7ce Fix FreeBSD 12
a4e4f745 Fix a -Wundef when FMT_GCC_VERSION < 600
7d3de497 Implement double to fp conversion
a4c7d99f Add bit_cast
0adccaef Fix a -Wundef of _LIBCPP_VERSION
2570f1af Provide more overloads for the wide string flavour
ca31ca13 Fixed arg_formatter_base::write_pointer to not mutate the format specs.
6cd66610 remove trailing spaces.
fe19c266 Move format_string to fmt namespace for ADL
2768af23 Add cached powers of 10
dd296e1d Add a script to compute powers of 10
0efc8a18 Fix compiler warning about narrowing
df1ba52b Update example
221b08fd Merge branch 'master' of github.com:fmtlib/fmt
fa9066fe context_base::begin -> out
90ff31b3 Fix a -Wundef warning on clang
b1f68c43 Merge branch 'master' of github.com:fmtlib/fmt
cd90097c Implement handmade FP
822eccc3 Sync API with standards proposal
2ae41242 allow time formatting with wchar_t contexts
a1579b0f Update key
ded921f0 Fix documentation build, take 2
3284751f Fix documentation build
bb738c4c Remove section on Write API since it's being superceeded by compile-time Format API
d180c25c Update godbolt link
1ed842a3 Update godbolt link
e80aba1c Remove format_float stub
7b8cb313 Make context_base::args() public
48ae0506 fixes MSVC compiler warning bloat (Visual Studio 2017, latest updates)
096c4051 Simplify char_traits
7610c536 Remove unused macro
111fa581 Update README.rst
52fcef1e Update docs
7d28674d make_args -> make_format_args
9382b76f context_t -> format_context_t
fd0b07a7 (w)context -> (w)format_context
26aa34f3 basic_context -> basic_format_context
44cc0346 Relax string_view requirements
0829cab8 Remove from_checked
cb7bbc62 Improve checked iterator support
5079f924 Fix a narrowing warning
5859e58b Fix msvc warnings
1e747f60 Fix msvc warnings
9d4efd7a Iterator Wars VI: Return of the checked iterator
9764f558 Update docs
4ef97b9b Add a missing comma
23759b26 basic_arg -> basic_format_arg, arg_store -> format_arg_store
4975297e Simplify counting iterators
e8e006f4 Fix compile checks for mixing narrow and wide strings (#690)
c5ebecf7 Document format_to_n
3cf05263 Return output iterator to the end from format_to_n
174087bf Implement format_to_n
050f3f1f Remove parts of obsolete write API
e90b1da3 Fix linker errors using fmt as shared library in MSVC
8e10d404 Fix compile tests
7a41d61d Add make_printf_args
4fea018b Fix string_view detection
6957d28c Detect string_view on libc++ (#686)
0ea70def Update readme
9ce5e30c Update readme
8c29459e Fix handling of empty string_view (#689)
a24005d5 Fix a narrowing warning
3651b7fc Fix a narrowing warning
b64486da Add format.cc
3da71d51 Move source files to the src directory
7971ed3d Update readme
f61ca2ec Update readme
84e520b7 Update readme
e8aa0f33 Update docs
17258e9c Update docs
6d339e32 Improve comment
c3d05245 Fix a shadowing warning
b58c8dde Update docs
505b3ae6 Workaround GCC bug 67371 (#682)
70dffc63 Remove unnecessary check
df828f88 Don't define FMT_GCC_VERSION on clang
42f70c8b Avoid narrowing casts
10b939b0 Remove unneeded usage of anonymous struct on clang
3adfaae2 Remove extra semicolon in format_args constructor
40066785 Fix warnings under MSVC (#679)
9c5f54a7 Add format example for padded hex byte
7bab90e5 Remove extra comma
2e21e7d1 Fix util-test
acb469ae Fixed UTF8/16 converters to support empty string input
c37c4c43 Fix find-package-test
6d21fc43 add alias targets with fmt namespace
e02aacc6 Add CMake namespace (#511)
aee4512c Gradle (#649)
7db0e94b Fix handling of numeric alignment with no width (#675)
9facc119 Update docs
a1d18711 Merge branch 'master' of github.com:fmtlib/fmt
daf650c4 Disallow formatting of multibyte strings into a wide buffer (#606)
8fd7e30f Update README.rst
ca93be13 Use fmt(s) as an alias for FMT_STRING(s)
80e57c7a Update to new naming conventions
ae3cc844 Check format string at compile time in print
585512fc Remove unnecessary instantiations
7755cdc1 Make symbols readable
f867d082 Update docs
a103b9bc Workaround missed optimization in gcc (#668)
bb47109a Cleanup
f1ede638 Make inline_buffer_size public and update docs
995b63ad Update copyright
40232917 Update docs
86a9bc82 Cleanup
b7632e96 Make format_to return iterator and update docs
5281ea6a do_vformat_to -> vformat_to and update docs
d07ba498 Fix docs
418659ad Fix compilation errors on gcc 4.4
1d2adef2 Fix compilation errors on gcc 4.4
45518c3f Fix compilation errors on gcc 4.4
698d9097 Workaround a bug in gcc 5.1
81074c70 Fix more compilation errors on gcc 4.6
1b452538 Fix more compilation errors on gcc 4.6
6090e51b Fix compilation errors on gcc 4.6
0827ec5a Fix compilation errors on gcc 4.6
4d35f941 Always use fallback string_view to pass format string (#664)
34cf54c2 Update README.rst
0565d654 Fix gcc 7.2 issue
f5dc0ed3 Break long lines
ea06f021 test: comment out one FormatStringErrors constexpr test
5b491773 test: Initialize some local variables
f45f70af Use trailing return type instead of deduction
db86e8d5 Remove a couple of unused argument names
55f5c9f2 Use FMT_NULL instead of 0 is a few more places.
e92ba107 Fix Python str.format link to point to Python 3 docs
a7ae5666 Enable join on msvc
24d249b0 Fix formatting of objects convertible to string_view
e508e308 Don't define FMT_LOCALE on OpenBSD
0ee4273b Put is_enum check first not to instantiate convert_to_int unnecessarily
8ca3ab2c Revert problematic pragma
18ac9870 Fix formatting of objects convertible to std::string
ce4a65ff Add pointer support to basic_writer
91721caa Add detection of wostream operator<< (#650)
1efc15c1 Fix MSVC build
8ed264fc Rename type enum constants to prevent collision with poorly written C libs (#644)
4ba3f7db Update docs
7d2723d5 posix.cc: Fix compilation with -fno-exceptions
24d66c5d compilation fix & warnings
229887bd Make constexpr remove_prefix gcc version check tighter (#648)
f3f19e76 Update docs
e9fa42ac Fix docs and build issues on gcc-4.6
affb35cf Replace using with typedef for compatibility with gcc-4.6
9710c058 Update documentation building script
1a4e8927 Move output_range to format.h
522de7b5 Replace using with typedef for compatibility with gcc-4.6
0b508fd2 Fix c++0x detection
1849735f Fallback to c++11 if c++14 not available
3239c518 Get rid of generic lambdas
78166ccd Get rid of generic lambdas
d8ef8a9e Cleanup
82222218 Update README.rst
b0005324 Merge the std branch
a502decd Added a fmt.pro to support build using qmake (#641)
61065e1a Fix unreachable code warning when signbit returns bool
403ae0a2 Add debug postfix for libfmt (#636)
5096c0fe Fix string_view detection
5b3f9eab Update syntax.rst
e802cf14 Add note about errno to the documentation
c96d6465 CMakeLists: Use GNUInstallDirs to set install location
dbd84697 Update usage.rst
5013c157 Silence MSVC 2017 constant if expression warning
cdfcee27 Use allocator_traits if available
66b25ef0 Add examples
6cb68f94 Fix warnings
0b635c9d Fix handling of fixed enums in clang (#580)
66afd9b3 Fix compilation on gcc 6
67e070fe Make format work with C++17 std::string_view (#571)
867b3309 Remove ANDROID macro check per comment in #458
64599973 Enable stream exceptions (#581)
35f8f036 Use less version 2.6.1 and sudo to fix npm install issues on travis
92a250fd Suppress Clang's warning on zero as a null pointer
2f13d41e Add to_wstring
1e19ae83 Workaround a bug in MSVC
3810d7e4 Workaround a bug in MSVC
5c7474e1 Relax constexpr requirements
1f57243b Relax constexpr requirements
dc540361 Conditionally compile constexpr
5d8ba816 Fix a segfault in test on glibc 2.26 #551
a9f810c1 Update README.rst
2582f41e Fix ifdefs
1a7d0ba2 Adding OpenSpace to the list of projects
8921f613 Update build script
f62e225e Automatically update version in release script (#431)
94806747 remove 'FMT_CPPFORMAT' CMake option
bfce29ff Improve conversion
8cf30aa2 Fix segfault on complex pointer formatting (#642)
f164e4c7 Remove old bcc-related comments
c57029c1 Add Drake & Lyft Envoy to the list of projects
8fa9acb8 Workaround broken __builtin_clz in clang with MS codegen (#519)
3dae2582 Describe cmake use of header-only target
1c7b751d Fix handling of implicit conversion to integral types larger than int
08dff377 Allow compiling and using as DLL in windows #502
c753a2af Don't include the world with WIN32_LEAN_AND_MEAN (#503)
a5185ec8 add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5
768061c8 Fix FormatBuf implementation (#491)
0c136381 Move back_insert_range to format.h
5060568f %.f should have zero precision, not default precision
a09f7488 Add Kodi (xbmc) to the list of projects using fmt
f9fa7c40 Add FMT_API and FMT_OVERRIDE where needed
a980d3b4 Add fmt::join to format ranges (#466)
87eab90e Fix missing intrinsic when included from C++/CLI (#457)
75005bbc Don't export the -std=c++11 flag from the fmt target
19f990a9 Use https to fetch dependencies from github
bca9de9e Return iterator from format_to
0555cea5 Added a fmt.pro to support build using qmake (#641)
a93270fd Replace a bunch of craft with type_traits, take 2
21429c86 Revert "Replace a bunch of craft with type_traits"
0473c48f Add std::basic_string allocator support (#441)
72d9fffd Fix test compilation for FreeBSD (#433)
e79588d6 Replace a bunch of craft with type_traits
3a6c7d0c Fix signbit detection (#423)
5e4c34b2 Add version macro FMT_VERSION (#411)
bd8a7e7e More iteratification
f78c3e41 Fix unreachable code warning when signbit returns bool
0a402056 Add CONTRIBUTING.rst
e35d41ff Add extern templates for format_float (#413)
d8c25a17 Use nullptr if available
e95e4659 Add syntax.rst to build
e5111950 argument index -> argument id
229ee34e Fix compiler warnings
7fe0f3da Update ChangeLog
38b603a4 Update README.rst
a1e7e4a7 Fix compilation with -fno-exceptions (#402, #405)
3f24a388 Thread-safe time formatting (#396)
f853d94a Remove unnecessary fmt/ prefix (#397)
9649919d Document use of format_arg for user-defined type #393
c8efe145 Add api.rst to build
da80005f Fix compilation on Cygwin (#388)
8ed16353 Fix a typo
1760c31b Workaround Doxygen mess
72606f23 Add missing types to counting_iterator
c1571003 Add debug postfix for libfmt (#636)
6822466a Handle nested braces in join (#638)
64b349ae More iterator support & fmt::count
e3b69efb Suppress msvc warnings in gmock
322736d3 Add support for arbitrary output iterators
10291194 Cleanup
c1d137ed Add support for nonconiguous iterators
f6fd38bb More iterator support
c2fecb9b Clean API
9a53a706 Add support for back_insert_iterator
91ee9c9a Return iterator from the format method
67928eae Don't inherit context from parse_context
217e7c76 Pass ranges by value
22994c62 Decouple arg_formatter_base from buffer
00f1450d Update tesmplate parameter names
3a2e89e1 Reduce dependency on buffer
c719d944 Fix experimental/string_view detection
cea3c207 Give a better error message for function pointers (#633)
232ceabb Workaround an internal compiler error in MSVC
c0954453 Replace buffer with range
c3d6c5fc Replace buffer with range
0f987731 add transition helper to format.h
d165d9c4 Decouple locale and buffer
36634140 Parameterize basic_writer on buffer type
6f2769d0 Revert "Added support for format string containing '\0' in _format udl (#619) (#620)"
5f1c73db Shorten a comment in locale.h
31934602 Update version
51a16f8c Update ChangeLog.rst
a0087460 Merge release branch
941663d0 Merge ostream.cc into ostream.h
955062da Merge printf.cc into printf.h
5705bf1c Added support for pre-c++17 experimental string_view (#607)
cabce31f Update syntax.rst
ccaae0c0 Refer to jeaiii project
e3715102 Add a integer formatter based on jeaiii
b3495f2e Update README.rst
61f296e3 Move FMT_HAS_BUILTIN to format.h
ce801c90 Remove dependency on <vector> and <array>
41fc2990 Merge branch 'std' of github.com:fmtlib/fmt into std
971fb584 Allow mixing named and automatic arguments
af0f21da add missing inline in header-only mode (#626)
7cea1638 numeric -> arithmetic
5328907f Get rid of <limits> dependency
faaafc7e Remove <utility> dependency and replace typedefs with using
94edb1a7 Add a lightweight header for the core API
3aaa25fa Added support for format string containing '\0' in _format udl (#619) (#620)
84bd2f19 Merge include/fmt/CMakeLists.txt into the main CMake file
7f351dec Decouple <locale> for better compile times
81bd9e8e args -> format_args
10e70a06 Improve handling of custom arguments
e0243000 arg_index -> arg_id
ac5f9520 Automatically add package to release
0e914372 Avoid conflict with the macro CHAR_WIDTH
f03a35a6 Check string specs at compile time
e9da5741 Check char specs at compile time
b25a0292 Check pointer type specs are compile time
c8a9d902 Check floating-point type specifiers
6570dc31 Disallow formatting of multibyte strings into a wide buffer (#606)
3851994a Fix yet another internal compiler error in MSVC
44e18651 Refactor parse context and fix warnings
e7e270f5 Test error on invalid type spec and remove unused alias
692b82d3 UdlArg -> udl_arg
c523dd58 Use error handler to report errors
5a32e64b More tests
093e2a47 Improve error handling
dc104cba Workaround internal compiler errors in MSVC
39411504 More tests
e3eb5ea0 Add parse_context::error_handler()
734e722d Fix warnings
62af25dc Workaround yet another MSVC internal error
594bd8fe More tests
f2b52bba More tests
dfdb1ade More tests
7967c2f8 Disable test that triggers an MSVC bug
18a0b94b Fix overflow check
686ff942 Fix compile-time parsing and add more tests
5b95b5d7 Test compile-time errors
246bdafc Add FMT_STRING macro for compile-time strings
e8055433 Remove FMT_USE_VARIADIC_TEMPLATES
dba1ccc4 Update readme
e613b3c7 Update readme
9fda7a36 Check integral type specs at compile time
92847a0d Add integral type handler
a03842b0 More compile-time checks
1c855a47 Integrate constexpr format specs parsing
780b44bf Add compile-time format string check
8ca6e76d Detect user-defined literal templates
a7e98616 Workaround another MSVC madness
db9ffa14 Make parse_format_string constexpr
e926ae78 Add parse_format_string
57e266ab Rename handlers
d29c7c3a Workaround a bug in MSVC
aadb38a5 Make specs_checker constexpr
dd0b72e1 Remove refactoring artefacts
e52b10e3 Merge branch 'vitaut-patch-1' of github.com:fmtlib/fmt into std
529d88ce Make dynamic_format_specs construction constexpr
d2f2a8b0 constexpr support of dynamic width and precision
6b3840b7 Make format_specs construction constexpr
a38bd9ca Fix formatting and naming
91014f01 Naming conventions
932ab2bf Report error from parse_nonnegative_int via handler
0ebdf41e Fix compile-test
170f5c67 Move headers to include/fmt
3d11eac7 Workaround another MSVC constexpr bug
c69e3086 Update README.rst
25aac0be Fix travis build on macOS
b83241ff Make format spec parsing constexpr
bd5188c8 Remove MinGW because it's not on appveyor image
62616b88 Workaround a bug in MSVC's constexpr handling
b8f85f67 Use Visual Studio 2017 image on appveyor
7174de0d Fix contexpr-ness of pointer_from
3785afc5 Pass errors to handler instead of throwing (#566)
1b5ccf6c Make parse_arg_id constexpr
17f93fe0 Make basic_string_view ctors constexpr
d5e918b6 Detect C++14 compiler support
be5b4552 Make null_terminating_iterator more iteratory
643fb066 Check for argument indexing switch
d45544d1 Fix width handling in dynamic formatting
8cbf5447 Add parse context
ec4f5175 Replace Range with ParseContext in parse()
83dd2ab9 Simplify dynamic_specs_handler
5a8ae0bb Fix a warning
39bc319b Update test results
534bff7d Fix handling of max packed arguments
0cda806d Fix compile tests
a3191a99 Get rid of FMT_MAKE_WSTR_VALUE macro
fced79b0 Get rid of old compat macros
be887d92 Replace internal::get with std::declval
53cf0735 Get rid of FMT_MAKE_VALUE macro
2972de4b Char -> char_type
9ee7c216 Type -> type
1a09194a Cleanup type handling
c18a4041 Remove conditional and to_iterator
1cade7ef Remove FMT_USE_RVALUE_REFERENCES
7413239f Remove unnecessary qualification
af00e4f9 Remove printf_arg_formatter from format.h and cleanup
44a26e5e CharPtr -> pointer_type and move to writer
0fbd8465 Replace fmt::internal::make_unsigned with std::make_unsigned
8a2bc0ab Add nullptr support
80505995 Allow delayed type checking
b0867f3f AlignSpec -> align_spec and fix a warning
f194a418 Replace fmt::is_same with std::is_same
47c84d79 Move part of write API (spec factories) to a separate header
20168147 Add ptr, a helper function for pointer formatting
77c892c8 Fix more warnings
be7d72ba Fix expansion-to-defined warning
d4c504ae Fix a warning
27ad6cee Use standard enable_if
64681739 Fix a warning
38806167 Remove FMT_HAS_GXX_CXX11
a7320bdc Fix a warning
016acebb Remove legacy code
07f8ffc4 Suppress shadowing warnings
466386d5 Suppress a warning in gmock
70ef82a8 Workaround a bug in MSVC
5e0562ab Separate parsing and formatting
1102d465 Make format spec parsing context-independent
45911770 Separate parsing and formatting in extension API
7bd776e7 Explain why null_terminating_iterator is used
873c8451 Remove system_header pragma
9f7957c0 Separate argument parsing and formatting
da439f28 Suppress warning about missing noreturn attribute (#549)
eefdb379 Fix an unused argument warning
2f4f49fd Switch from cstring_view to string_view
a8d6f309 Minor optimizations
d16582a0 Move printf-related code to printf.cc
361911dd Use preinstalled version of cmake on travis
9ea183aa Fix MSVC build
8f4b918c Check argument index
4193485b Remove test files
07123e8f Use Ubuntu Trusty on Travis for a new CMake
586d6363 Implement more efficient handling of large number of format arguments
12252152 CStringRef -> cstring_view
5aa8d6ea Return locale by value
32ec13f1 Switch to C++ locale
b4f4b7e2 Clean the buffer API (#477)
f423e468 Replace clear() with resize(0) and data_ -> store_
23b8c24d Add noexcept
7175bd8a Fix error on MinGW
7258d1b8 Fix tests
3610f34c Fix windows build
572491ad Document which header defines formatting functions
c333dca0 Follow standard naming conventions
6a2ff287 Follow standard naming conventions
eedfd07f internal::MemoryBuffer -> basic_memory_buffer
4ec88607 ArgFormatter -> arg_formatter
50e71673 StringRef -> string_view, LongLong -> long_long
e022c21d Fix windows build
87b691d8 Merge StringWriter into StringBuffer
c2f02169 Merge ArrayWriter into FixedBuffer
fefaf07b Pass buffer instead of writer to format_value
6e568f3a buffer -> basic_buffer
bb1c82ef Fix build
a13b96ed Simplify API
624c5868 Simplify API
7ae8bd70 basic_format_arg -> basic_arg, Buffer -> buffer
bf0f1075 Parameterize format_specs on character type
296e9cad FrmatSpec -> format_spec
b5fb8dd1 stream -> buffer
984a1029 Remove IntFormatSpec and StrFormatSpec
4863730e Remove pad
aaa0fc39 Improve compatibility with old compilers and fix test
aea5d3ab Improve compatibility with older gcc and update tests
84850277 Use named argument emulation instead of nested functions
ec15ef7b Replace operator<< with write function
b77c8190 FPUtil -> fputil
8428621d BasicWriter -> basic_writer
939aff29 Remove unnecessary template arg from basic_format_args
f69786a7 Remove Not
b2a0d891 Merge value and MakeValue
acd1811c Value -> value
42a31907 Parameterize Value on context
a4d6cb32 Clean up basic_format_arg
d705d516 Parameterize basic_format_arg on context (#442)
422236af Don't erase writer type
abb6996f MakeArg -> make_arg
ee1651ce Handle empty format_arg state
3bbc5799 Fix MinGW build
63fcfc57 Fix build on older gcc
d86e51e9 Don't inherit basic_format_arg from internal::Value
f0588869 Fix handling of unpacked args (#437)
11836218 Add support for exotic character types
763ca978 Parameterize Value on character type
6cba8fe9 Move stuff out of internal::Value
e1ee5bf0 Replace StringValue with StringRef
0854f8c3 Parameterize formatting argument on char type.
9cf6c8fd Get rid of fmt::internal::Arg
5f022ae0 Remove FMT_DISPATCH
41d4bcf0 Ingore Xcode files
28429701 Merge BasicArgFormatter and ArgFormatter
d4084ac5 Get rid of ArgVisitor
d58cc8a4 Merge BasicPrintfArgFormatter and PrintfArgFormatter
e2dfd39c Update arg visitors
751ff64b Update ArgConverter to the new visitor API
c9dc41ab Replace ArgVisitor::visit with a free visit function
caa60b9c Update comment
95a53e1f Refactor argument visitor API (#422)
6d241167 Improve visitor API
a1dd524b format_arg -> do_format_arg
55a1ac50 Fix test
85793a18 Simplify API
9998f66f Replace formatter with context
2bba4203 Pass writer directly to format_value (#400)
b656a1c1 Make value the second argument to format_value
edf98792 Pass writer to format_value
64ca334a CharType -> Char
be613204 Char -> char_type
f85d5f4d BasicFormatter -> basic_formatter
18dfa257 Pass correct formatters to make_format_args
dafbec75 Fix type safety when using custom formatters (#394)
506435bf Fix formatting
f2879940 Fix formatting
48fe9783 Add format_arg::operator bool
119a63ab internal::Arg -> format_arg
65a8c2c3 format_arg -> format_value
13b04044 Add format_args::size_type
8a77e792 Enable C++11 in tests.
1e8553d6 Enable C++11 in tests.
06bab3ed Workaround mingw bug https://sourceforge.net/p/mingw/bugs/1531/
6fd6ecc1 Enable C++11 for no-windows-h-test
c4212f9e format -> vformat
21c6700b Don't build std branch with -std=c++0=98
209a1d58 Get rid of macros
9a079732 Test types
ea28a637 Get rid of FMT_VARIADIC_CTOR
0d8aca8d Get rid of FMT_VARIADIC_VOID
4ece95a7 Make make_format_args public
0028ce57 Get rid of FMT_VARIADIC
ece7ae5f Make format_arg_store convertible to format_args
621447fe Make initialization C++11-compatible
a0190e4b Add a missing include
b903f5c1 format -> vformat
43c0095a Refactor type mapping
4873685c ArgArray -> format_arg_store
fc73e106 ArgList -> format_args
92605eb4 Remove FMT_USE_VARIADIC_TEMPLATES
9bb213e9 FormatError -> format_error
REVERT: 135ab5cf Update version
REVERT: 93d95f17 Fix markup
REVERT: 4f15c72f Fix markup
REVERT: e9b19414 Automatically add package to release
REVERT: c3d1f604 Fix markup
REVERT: c96062bf Update changelog and version number

git-subtree-dir: externals/fmt
git-subtree-split: 3e75ad9822980e41bc591938f26548f24eb88907
2018-10-02 21:24:56 +01:00
MerryMage
bcb947eb6b externals: Update fmt to 5.2.1
Merge commit '49041cb4514956a8754df6f1845f5593037ac870' into HEAD
2018-10-02 21:24:56 +01:00
Merry
ba7a5b6c98
Merge pull request #401 from lioncash/folding
constant_propagation_pass: Fold &, |, ^, and ~ operations where applicable
2018-10-02 21:22:58 +01:00
Lioncash
7868411de5
constant_propagation_pass: Fold NOT operations 2018-10-01 18:53:54 -04:00
Lioncash
0d1f9841d1
constant_propagation_pass: Fold OR operations 2018-10-01 18:53:54 -04:00
Lioncash
142978041d
constant_propagation_pass: Fold AND operations 2018-10-01 18:53:54 -04:00
Lioncash
be3ba545e7
ir/value: Add member function to check whether or not all bits of a contained value are set
This is useful when we wish to know if a contained value is something
like 0xFFFFFFFF, as this helps perform constant folding. For example the
operation: x & 0xFFFFFFFF can be folded to just x in the 32-bit case.
2018-10-01 18:53:47 -04:00
MerryMage
4e6848d1c9 A32/ir_emitter: Bugfix: ExceptionRaised was producing incorrect PC
Use actual PC and not pipelined PC.
2018-09-30 19:39:52 +01:00
Lioncash
f5233bfc69
constant_propagation_pass: Fold EOR operations
It's possible to fold cases of exclusive OR operations if they can be
known to be an identity operation, or if both operands happen to be known
immediates, in which case we can just store the result of the
exclusive-OR directly.
2018-09-29 03:59:15 -04:00
Lioncash
41ba9fd7bc value: Move ImmediateToU64() to be a part of Value's interface
This'll make it slightly nicer to do basic constant folding for 32-bit
and 64-bit variants of the same IR opcode type. By that, I mean it's
possible to inspect immediate values without a bunch of conditional
checks beforehand to verify that it's possible to call GetU32() or
GetU64, etc.
2018-09-28 22:19:11 +01:00
MerryMage
c6a6271f86 reg_alloc: Emit AVX instructions where able
Smaller codesize.
2018-09-28 21:12:48 +01:00
MerryMage
aedd32aa20 abi: Emit AVX instructions where able
Smaller codesize.
2018-09-28 21:12:17 +01:00
MerryMage
f2d9337663 a64_exclusive_monitor: Loosen memory ordering requirements
It is not necessary to be as strict as it was.
2018-09-27 16:21:56 +01:00
Lioncash
7ca709de81 travis: Make macOS builds use Xcode 10
Keeps the toolchain up to date and allows the use of things like
<optional> and <variant> from the standard library.
2018-09-25 19:23:51 +01:00
MerryMage
14dd45eed9 Fix VShift terminology
An arithmetic shift is by definition a signed shift, and a logical shift is by definition an unsigned shift.

- Rename VectorLogicalVShiftS* -> VectorArithmeticVShift*
- Rename VectorLogicalVShiftU* -> VectorLogicalVShift*
2018-09-23 10:50:39 +01:00
MerryMage
88554c4f04 emit_x64_vector: AVX512 implementation of EmitVectorLogicalVShiftS16 2018-09-23 10:41:41 +01:00
MerryMage
ab4e316b24 emit_x64_vector: AVX512 implementation of EmitVectorLogicalVShiftS64 2018-09-23 10:41:30 +01:00
MerryMage
0ea84f34fe emit_x64_vector: AVX2 implementation of EmitVectorLogicalVShiftS32 2018-09-23 10:41:10 +01:00
MerryMage
c77a2c5bab emit_x64_vector: AVX512 implementation of EmitVectorLogicalVShiftU16() 2018-09-23 10:14:20 +01:00
MerryMage
e9441fd561 emit_x64_vector: AVX2 implementation of EmitVectorLogicalVShiftU64() 2018-09-23 10:14:20 +01:00
MerryMage
0e9c33cbf3 emit_x64_vector: AVX2 implementation of EmitVectorLogicalVShiftU32() 2018-09-23 10:14:20 +01:00
Lioncash
8f8527407c emit_x64_vector: SSSE3 variant of EmitVectorCountLeadingZeros8()
pshufb lyfe
2018-09-23 10:13:08 +01:00
Mat M
be05e75818
Merge pull request #397 from VelocityRa/dec-shift-fix
decoders: Cast to correctly-sized type before shifting
2018-09-22 19:17:36 -04:00
VelocityRa
bc328fc645 decoders: Cast to correctly-sized type before shifting
Fixes decoding for 64-bit instructions

Does not help/apply to any currently supported ARM versions (since
all are 32-bit length or below), it's for future-proofing should
such an arch be supported.
2018-09-22 22:10:29 +03:00
MerryMage
9c3d2d104d a64_emit_x64: Lowercase PAGE_SIZE
PAGE_SIZE is defined as a macro by musl.
2018-09-22 18:54:49 +01:00
MerryMage
f538d29be7 emit_x64_vector_floating_point: SSE4.1 implementation of EmitFPVectorToFixed 2018-09-22 18:47:15 +01:00
MerryMage
1603a6e9f8 emit_x64_vector_floating_point: EmitFPVectorRoundInt: Use FCODE 2018-09-22 16:19:54 +01:00
MerryMage
2e1ccaff53 emit_x64_vector: AVX implementation for EmitVectorCountLeadingZeros8 2018-09-22 16:08:23 +01:00
MerryMage
555bfdacf9 emit_x64_vector: SSE implementation of EmitVectorCountLeadingZeros16 2018-09-22 13:05:47 +01:00
Lioncash
71c2589662
externals: Update Xbyak to 5.73
Merge commit '1ec1b2febb1eac58cf98384dd8ba977a74be7054' into xbyak
2018-09-19 17:55:45 -04:00
Lioncash
1ec1b2febb Squashed 'externals/xbyak/' changes from 1de435ed..42462ef9
42462ef9 use evex encoding for vpslld/vpslldq/vpsraw/...(reg, mem, imm);
da9117a9 update version of readme.md
d35f4fb7 fix the encoding of vinsertps for disp8N

git-subtree-dir: externals/xbyak
git-subtree-split: 42462ef922893f0d3f2156d005fa27ba6898498b
2018-09-19 17:54:43 -04:00
MerryMage
171d11659d A64: Implement SCVTF, UCVTF (vector, fixed-point), scalar variant 2018-09-19 20:11:14 +01:00
MerryMage
f221bb0095 emit_x64_floating_point: Reduce fallback LUT code in EmitFPToFixed 2018-09-19 20:11:14 +01:00
MerryMage
eb123e2a74 A64: Implement FCVTZS, FCVTZU, UCVTF, SCVTF (vector, fixed-point), vector variant 2018-09-19 19:47:28 +01:00
Lioncash
487d37a4a1 A64: Implement UQSHL's vector immediate and register variants 2018-09-19 12:13:22 +01:00
Lioncash
f69893345f ir: Add opcodes for unsigned saturating left shifts 2018-09-19 12:13:22 +01:00
Lioncash
7148e661f6 A64/translate/impl: Make signatures consistent for unimplemented by-element SIMD variants
Makes them all consistent, so it isn't necessary to change the
prototypes over when implementing them.
2018-09-19 12:11:35 +01:00
Lioncash
fdde4ca363 A64: Implement BRK
Currently, we can just implement this as part of the exception
interface, similar to how it's done for the A32 interface with BKPT.
2018-09-19 07:09:27 +01:00
Lioncash
b1490db0e9 A64/imm: Add full range of comparison operators to Imm template
Makes the comparison interface consistent by providing all of the
relevant members. This also modifies the comparison operators to take
the Imm instance by value, as it's really only a u32 under the covers,
and it's cheaper to shuffle around a u32 than a 64-bit pointer address.
2018-09-19 07:09:00 +01:00
MerryMage
1ec40ef6ed IR: Add fbits argument to FPVectorFrom{Signed,Unsigned}Fixed 2018-09-18 21:46:17 +01:00
MerryMage
d6d5e986c2 A64: Implement SCVTF, UCVTF (scalar, fixed-point) 2018-09-18 21:08:06 +01:00
MerryMage
6513595c09 opcodes.inc: Align columns to a tabstop of 4 2018-09-18 20:37:03 +01:00
MerryMage
6b0d2b529e IR: Add fbits argument to FixedToFP-related opcodes 2018-09-18 20:36:37 +01:00
Lioncash
c4b383124f A64: Implement SQSHL's vector immediate variant 2018-09-18 18:22:03 +01:00
Lioncash
e0d8d2d855 A64: Implement SQSHL's vector register variant 2018-09-18 18:22:03 +01:00
Lioncash
532762582b ir: Add opcodes for left signed saturated shifts 2018-09-18 18:22:03 +01:00
Lioncash
9705252968 branch: Make variables const where applicable 2018-09-18 17:45:49 +01:00
Lioncash
650946e41c move_wide: Make variables const where applicable 2018-09-18 17:45:49 +01:00
Lioncash
62b3a6dcfb load_store_register_unprivileged: Make variables const where applicable 2018-09-18 17:45:49 +01:00
Lioncash
3add1c7b3f load_store_register_immediate: Place conditional bodies on their own line
Makes the conditionals visually consistent with the rest of the
codebase.
2018-09-18 17:45:49 +01:00
Lioncash
2fc4088a74 load_store_load_literal: Make variables const where applicable 2018-09-18 17:45:49 +01:00
Lioncash
b2c146259f data_processing_logical: Move datasize declarations after early-exit conditionals
While we're at it, make variables const where applicable.
2018-09-18 17:45:49 +01:00
Lioncash
028028f9eb data_processing_conditional_select: Make variables const where applicable
Makes CSEL's function consistent with all of the others.
2018-09-18 17:45:49 +01:00
Lioncash
c66042da57 data_processing_addsub: Move datasize declarations after early-exit conditionals
While we're at it, also make relevant variables const where applicable
2018-09-18 17:45:49 +01:00
Lioncash
6bc546e1f7 data_processing_bitfield: Move datasize variables after early-exit conditionals
Moves the declaration of datasize to the scope that it's used within.
This also takes the opportunity to apply const where applicable, and
make early-exits all vertically consistent with one another.
2018-09-17 18:14:16 +01:00
Lioncash
2aad5fa87f A64: Implement CLS's vector variant
Leverages CLZ like the integral variant does.
2018-09-17 18:14:00 +01:00
Lioncash
6c877ff8db emit_x64_vector: Make EmitVectorUnsignedSaturatedAccumulateSigned() internally linked
Given this is just an internal helper function, it can be marked static.
2018-09-16 08:16:54 +01:00
Lioncash
4b5926dcab perf_map: Use std::string_view instead of std::string for PerfMapRegister()
We can just use a non-owning view into a string in this case instead of
potentially allocating a std::string instance.
2018-09-16 08:16:43 +01:00
MerryMage
74459479b9 A64: Implement SQRDMULH (vector), vector variant 2018-09-15 14:04:42 +01:00
MerryMage
03b80f2ebe A64: Implement SQDMULL (vector), vector variant 2018-09-15 13:38:37 +01:00
MerryMage
4a2c5962c7 IR: Add VectorSignedSaturatedDoublingMultiplyLong 2018-09-15 13:38:17 +01:00
MerryMage
59dc33ef12 emit_x64_vector: Changes to VectorSignedSaturatedDoublingMultiply
* Return both the upper and lower parts of the multiply if required
* SSE2 does not support the pmuldq instruction, do sign correction to an unsigned result instead
* Improve port utilisation where possible (punpck instructions were a bottleneck)
2018-09-15 09:55:25 +01:00
MerryMage
bbaebeb217 IR: Implement Vector{Signed,Unsigned}Multiply{16,32} 2018-09-15 09:55:25 +01:00
Lioncash
baac5a8810 backend_x64/a64_interface: Re-enable the constant folding pass
This was disabled for debugging, but never re-enabled. Just to be sure,
testing was done downstream in yuzu to make sure this didn't happen to
break anything (which seems to be the case).
2018-09-14 12:14:19 +01:00
MerryMage
e78ca1947b emit_x64_vector_floating_point: Hardware FMA implementation for RSqrtStepFused 2018-09-12 21:01:06 +01:00
MerryMage
8a5ae9a366 emit_x64_vector_floating_point: Hardware FMA implementation of FPVectorRecipStepFused 2018-09-12 20:45:39 +01:00
MerryMage
39818f98e8 emit_x64_floating_point: Hardware FMA implementation of FPRSqrtStepFused 2018-09-12 16:10:18 +01:00
MerryMage
3d0a0b432b emit_x64_floating_point: Hardware FMA implementation of FPRecipStepFused{32,64} 2018-09-12 14:58:09 +01:00
MerryMage
2293dff6d8 emit_x64_vector: SSE implementation of VectorSignedSaturatedAccumulateUnsigned{8,16,32} 2018-09-11 19:57:31 +01:00
Lioncash
2047683777 emit_x64_vector: Correct static asserts for < 64-bit type checks in saturated accumulate fallbacks
I had initially meant to use BitSize() here, not sizeof()
2018-09-11 07:08:32 +01:00
MerryMage
55e9e401aa emit_x64_vector: EmitVectorSignedSaturatedAccumulateUnsigned64: SSE implementation 2018-09-10 22:39:30 +01:00
MerryMage
1076651426 emit_x64_vector: Simplify fpsr_qc related code
Move the bool conversion into A64JitState::GetFpsr so we don't have to continuously
pay the cost of conversion for every saturation instruction.
2018-09-10 21:24:07 +01:00
Lioncash
4039030234 A64: Implement CLZ's vector variant 2018-09-10 18:30:40 +01:00
Lioncash
0bb908fb53 ir: Add opcodes for vector CLZ operations
We can optimize these cases further for with the use of a fair bit of
shuffling via pshufb and the use of masks, but given the uncommon use of
this instruction, I wouldn't consider it to be beneficial in terms of
amount of code to be worth it over a simple manageable naive solution
like this.

If we ever do hit a case where vectorized CLZ happens to be a
bottleneck, then we can revisit this. At least with AVX-512CD, this can
be done with a single instruction for the 32-bit word case.
2018-09-10 18:30:40 +01:00
MerryMage
3b13259630 A64/translate: VectorZeroUpper for V(64) stores
Ensures correctness.
2018-09-09 19:59:02 +01:00
MerryMage
1931d44495 simd_two_register_misc: FNEG (vector) with Q == 0 had dirty upper 2018-09-09 19:55:37 +01:00
Lioncash
a0790f02d0 emit_x64_vector: Remove unnecessary [[maybe_unused]] attributes
These were unintentionally left in when introducing SUQADD and USQADD
2018-09-09 19:30:14 +01:00
Lioncash
b0e1eb5a15 A64: Implement USQADD's scalar and vector variants 2018-09-09 17:06:03 +01:00
Lioncash
28424c7ad1 ir: Add opcodes form unsigned saturated accumulations of signed values 2018-09-09 17:06:03 +01:00
Lioncash
9923ea0b71 A64: Implement SUQADD's scalar and vector variants 2018-09-09 17:06:03 +01:00
Lioncash
4c0adbb7f1 ir: Add opcodes for signed saturated accumulations of unsigned values 2018-09-09 17:06:03 +01:00
Lioncash
799bfed2df A64: Implement SMLAL{2}, SMLSL{2}, UMLAL{2}, and UMLSL{2}'s vector by-element variants
We can simply modify the general function made for SMULL{2} and
UMULL{2}'s by-element variants to also handle the other multiply-based
by-element variants.
2018-09-09 13:55:40 +01:00
Lioncash
94451ec321 A64: Implement UMULL{2}'s vector by-element variant 2018-09-09 13:55:40 +01:00
Lioncash
45867deac9 A64: Implement SMULL{2}'s vector by-element variant 2018-09-09 13:55:40 +01:00
Lioncash
02357939ac ir/value: Replace includes with forward declarations
enum classes are still considered complete types when forward declared
(as the compiler knows the exact size of the type from the declaration
alone). The only difference in this case being that the members of the
enum class aren't visible. Given we don't use the members within this
header in any way, we can simply forward declare them here and remove
the inclusions.
2018-09-09 09:04:22 +01:00
Lioncash
450f721df5 ir/cond: Migrate to C++17 nested namespace specifiers 2018-09-09 09:03:42 +01:00
Lioncash
e649988cd6 CMakeLists: Add missing cond.h header to file listing
Allows the file to show up within IDEs more easily.
2018-09-09 09:03:42 +01:00
Lioncash
d20e7694dd A64: Implement URSQRTE 2018-09-09 00:37:28 +01:00
Lioncash
4f3bde5f12 ir: Add opcodes for performing unsigned reciprocal square root estimates 2018-09-09 00:37:28 +01:00
Lioncash
cfeeaec1c6 A64: Implement URECPE 2018-09-09 00:37:28 +01:00
Lioncash
622b60efd6 ir: Add opcodes for unsigned reciprocal estimate 2018-09-09 00:37:28 +01:00
Lioncash
d17599af40
Update Xbyak to 5.71
Merge commit 'f7c26e9f7ace572f440b80b0e71625295755c38b'
2018-09-08 17:09:25 -04:00
Lioncash
f7c26e9f7a Squashed 'externals/xbyak/' changes from 671fc805..1de435ed
1de435ed bf uses Label class
613922bd add Label L() for convenience
43e15583 fix typo
93579ee6 add protect-re.cpp
60004b5c fix url of protect-re.cpp
348b2709 fix typo of doc
f34f6ed5 update manual
232110be update test
82b78bf0 add setProtectMode
dd8b290f put warning message if pageSize != 4096
64775ca2 a little refactoring
7c3e7b85 fix wrong VSIB encoding with idx >= 16

git-subtree-dir: externals/xbyak
git-subtree-split: 1de435ed04c8e74775804da944d176baf0ce56e2
2018-09-08 16:52:55 -04:00
Lioncash
8782b69c93 travis: Make macOS build with Xcode 9.4.1
Builds against the latest release version of the Xcode toolchain
2018-09-08 13:21:58 +01:00
Lioncash
b575b23ea9 A64: Implement SQNEG's scalar and vector variant 2018-09-08 11:23:32 +01:00
Lioncash
06062a91c5 A64: Add opcodes for signed saturating negations 2018-09-08 11:23:32 +01:00
Lioncash
1c40579de5 emit_x64_vector: Simplify "position == 0" case for EmitVectorExtract()
In the event position is zero, we can just treat it as a NOP, given
there's no need to move the data.
2018-09-08 11:23:32 +01:00
Lioncash
e335050886 emit_x64_vector: Simplify "position == 0" case for EmitVectorExtractLower()
In the event position == 0, we can just treat it as a simple movq,
clearing the upper half of the XMM register. This also makes that case
use only one register.
2018-09-08 11:23:32 +01:00
Lioncash
8b13421bac A64: Implement SQDMULH's by-element scalar variant 2018-09-08 11:23:32 +01:00
Lioncash
9122a6e19e A64: Implement SQDMULH's by-element vector variant 2018-09-08 11:23:32 +01:00
MerryMage
176e60ebb1 backend/x64: Do not clear fast_dispatch_table if not enabled
There is no need to pay for the cost of setting a large block of memory if we're not using it.
2018-09-08 11:23:32 +01:00
MerryMage
959446573f A64: Implement FastDispatchHint 2018-09-07 22:07:44 +01:00
MerryMage
2be95f2b3b A32: Implement FastDispatchHint 2018-09-07 22:07:44 +01:00
MerryMage
96f23acd00 ir/terminal: Add FastDispatchHint 2018-09-07 21:29:47 +01:00
Lioncash
f5ca9e9e4a A64: Implement SQDMULH's scalar variant 2018-09-06 20:35:43 +01:00
Lioncash
af8bea59d5 ir: Add opcodes for scalar signed saturated doubling multiplies 2018-09-06 20:35:43 +01:00
Lioncash
fed4220dc0 A64: Implement SQDMULH's vector variant 2018-09-06 20:35:43 +01:00
Lioncash
72eb6ad362 ir: Add opcodes for signed saturated doubling multiplies 2018-09-06 20:35:43 +01:00
Lioncash
0f8ae84c80 externals: Update catch to 2.4.0
Keeps the unit testing library up to date.
2018-09-06 20:33:10 +01:00
Lioncash
235165ba70 A64: Implement SQABS' scalar variant 2018-09-06 15:49:25 +01:00
Lioncash
1adca93d4a A64: Implement SQABS' vector variant. 2018-09-06 15:49:25 +01:00
Lioncash
f978c445fa ir: Add opcodes for signed saturated absolute values 2018-09-06 15:49:25 +01:00
MerryMage
d895a84e72 emit_x64_floating_point: EmitFPToFixed: maxsd optimization
maxsd is not required when doing a signed conversion, because x64
produces a 0x80...00 value for out of range values.
2018-09-06 15:44:09 +01:00
MerryMage
c624fe3ff3 emit_x64_floating_point: ZeroIfNaN: pxor -> xorps
xorps is shorter and more appropriate here.
2018-09-05 22:00:36 +01:00
MerryMage
e987a84062 IR: Simplify FP{Single,Double}ToFixed{U,S}{32,64} 2018-09-05 21:04:40 +01:00
Lioncash
f1babc8924 externals: Update catch to 2.3.0
Keeps the unit-testing library up to date.
2018-09-03 17:56:02 +01:00
Lioncash
a0c587ac1a A32/decoder: Add missing <algorithm> includes
These includes should be present, as we use std::find_if() within these headers.
2018-09-03 13:53:26 +01:00
Lioncash
0435ac2d80 emit_x64_vector: Provide AVX path for EmitVectorMinU64() 2018-08-31 21:15:48 +01:00
Lioncash
5e40b8fcf8 emit_x64_vector: Provide AVX path for EmitVectorMinS64() 2018-08-31 21:15:48 +01:00
Lioncash
26bc231b47 emit_x64_vector: Provide AVX path for EmitVectorMaxU64() 2018-08-31 21:15:48 +01:00
Lioncash
ae734a7a8e emit_x64_vector: Provide AVX path for EmitVectorMaxS64() 2018-08-31 21:15:48 +01:00
Lioncash
1d0334c8cb emit_x64_vector: Simplify EmitVectorLogicalLeftShift8()
Similar to EmitVectorLogicalRightShift8(), we can determine a mask ahead
of time and just and the results of a halfword left shift.
2018-08-31 19:44:54 +01:00
Lioncash
f4a1196e60 emit_x64_vector: Simplify EmitVectorLogicalShiftRight8()
We can generate the mask and AND it against the result of a halfword
shift instead of looping.
2018-08-31 19:44:54 +01:00
Lioncash
4fc51f41b1 emit_x64_vector: Amend value definition in SSE 4.1 path for EmitVectorSignExtend16()
We should be defining the value after the results have been calculated
to be consistent with the rest of the code.
2018-08-31 13:48:32 +01:00
Lioncash
e50adae441 emit_x64_vector: Remove fallback in EmitVectorSignExtend64()
This is fairly trivial to do manually.
2018-08-31 13:48:14 +01:00
Lioncash
0a364f385d emit_x64_vector: Remove fallback for EmitVectorSignExtend32()
We can just do the extension manually, which gets rid of the need to
fall back here.
2018-08-31 13:48:14 +01:00
Lioncash
799e519707 ir_emitter: Rename fpscr_controlled parameters to fpcr_controlled
Part of addressing #333
2018-08-28 18:43:01 +01:00
MerryMage
68ca03e8d4 a32/exception_generating: BPKT: Define unpredictable behaviour
Define unpredictable behaviour to be BKPT executes conditionally
2018-08-26 00:48:29 +01:00
MerryMage
42c0589881 A32: Add define_unpredictable_behaviour option 2018-08-26 00:48:27 +01:00
MerryMage
3262736fb6 A32/location_descriptor: Change formatting to use hex 2018-08-26 00:33:44 +01:00
MerryMage
f3bb54e042 microinstruction: A32ExceptionRaised causes CPU exception 2018-08-26 00:33:43 +01:00
MerryMage
2b4224bcb4 A32/types: CondToString: Add nv 2018-08-25 23:02:58 +01:00
MerryMage
0d17b076bd block_of_code: Hide NX support behind compiler flag
Systems that require W^X can use the DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT cmake option.
2018-08-23 20:56:05 +01:00
MerryMage
1ee3f3d9e6 Implement perfmap 2018-08-23 15:09:19 +01:00
MerryMage
72ed55f143 a32_emit_x64: Fix incorrect BMI2 implementation for SetCpsr
* The MSB for each byte in cpsr_ge were not being appropriately set.
* We also expand test coverage to test this case.
* We fix the disassembly of the MSR (imm) and MSR (reg) instructions as well.
2018-08-23 14:48:23 +01:00
MerryMage
2a705d0393 backend/x64: Support W^X systems
Closes #176.
2018-08-22 13:21:23 +01:00
BreadFish64
c95f023403 Backend: Create "backend" folder
similar to the "frontend" folder
2018-08-22 13:13:46 +01:00
MerryMage
deb1ab62d4 A64/translate: Standardize arguments of helper functions
Don't pass in IREmitter when TranslatorVisitor is already available.
2018-08-21 12:26:46 +01:00
MerryMage
30b6a5ffca A64/translate: Standardize TranslatorVisitor abbreviation
Prefer v to tv.
2018-08-21 12:16:32 +01:00
MerryMage
f9cd96bb1a emit_x64_vector: Avoid recalculating addresses in EmitVectorTableLookup 2018-08-21 12:16:32 +01:00
Lioncash
a42f301c28 A64: Implement SQXTN, SQXTUN, and UQXTN's scalar variants
We can implement these in terms of the vector variants
2018-08-20 08:08:57 +01:00
Lioncash
8a822def14 A64: Implement SDOT and UDOT's (by element) variants
Gets all of the dot product instructions out of the way.
2018-08-20 08:06:59 +01:00
MerryMage
b604f0d237 emit_x64_vector: Don't load zero constant from memory in EmitVectorTableLookup 2018-08-19 21:33:33 +01:00
MerryMage
8ac462fca9 emit_x64_vector: Special-case is_defaults_zero && table_size == 2 in EmitVectorTableLookup 2018-08-19 21:32:54 +01:00
MerryMage
08fae72a57 emit_x64_vector: Release registers when possible in EmitVectorTableLookup 2018-08-19 21:08:00 +01:00
MerryMage
c7d264bbe2 reg_alloc: Add the ability to Release an allocation early 2018-08-19 21:07:37 +01:00
MerryMage
3172a4b066 emit_x64_vector: Special-case table_size == 1 in EmitVectorTableLookup 2018-08-19 09:29:41 +01:00
MerryMage
50c589b2b5 emit_x64_vector: SSE4.1 implementation of EmitVectorTableLookup 2018-08-18 22:07:58 +01:00
MerryMage
bc6cf3021f A64: Implement TBL and TBX 2018-08-18 22:00:03 +01:00
MerryMage
8067ab9553 IR: Add VectorTable and VectorTableLookup IR instructions 2018-08-18 21:59:44 +01:00
MerryMage
0e0e839ba0 opcodes: Cleanup opcodes table
* Remove T:: prefix from types.
* Add another column for a 4th argument.
2018-08-18 19:39:59 +01:00
Lioncash
8e47d44c4d A64: Implement SDOT and UDOT's vector variant 2018-08-18 15:19:39 +01:00
Lioncash
3a367f341f A64: Implement SADALP and UADALP
While we're at it we can join the code for SADDLP and UADDLP with these
instructions, since the only difference is we do an accumulate at the
end of the operation.
2018-08-18 14:24:43 +01:00
Lioncash
5f322a160f A64: Implement SRSHL and URSHL
Implements both scalar and vector variants.
2018-08-18 14:23:29 +01:00
Lioncash
a278775c43 ir: Add opcodes for performing rounding left shifts 2018-08-18 14:23:29 +01:00
MerryMage
720efe337e emit_x64_floating_point: Fix smallest normal check in EmitFPMulAdd 2018-08-18 13:49:19 +01:00
Lioncash
fc96d512c9 A64: Implement ISB
Given we want to ensure that all instructions are fetched again, we can
treat an ISB instruction as a code cache flush.
2018-08-18 13:30:54 +01:00
Lioncash
2a0317198f A64: Implement FCVTN{2} 2018-08-16 23:01:38 +01:00
Lioncash
f9e084283b A64: Implement FCVTL{2} 2018-08-16 23:01:38 +01:00
Lioncash
9f873410c8 A64: Implement FMAXNM and FMINNM vector variants.
Currently we can implement these in terms of the scalar IR variants.
2018-08-16 23:00:42 +01:00
Lioncash
d5d2c36221 A64: Implement FMAXP, FMAXNMP, FMINP, and FMINNMP's vector variants
We can just implement these in terms of scalars for the time being.
2018-08-16 15:12:43 +01:00
MerryMage
1474f09d1c emit_x64_vector_floating_point: Correct value of smallest_normal_number 2018-08-16 10:55:02 +01:00
MerryMage
821cabac1b fp/info: Incorrect point_position in FPValue 2018-08-16 10:50:28 +01:00
MerryMage
550d662f0e load_store_exclusive: Define s == t state to be Constraint_NONE
Downstream (yuzu) mentioned that the instruction:

STXR W9, W9, [X0]

was executed in the program "Crash N-Sane Trilogy".
2018-08-16 10:04:54 +01:00
MerryMage
0b69381ff4 A64/translate: Allow for unpredictable behaviour to be defined 2018-08-16 09:59:06 +01:00
MerryMage
6d236d459f system: Implement MRS CNTFRQ_EL0 2018-08-16 09:58:34 +01:00
MerryMage
6cbb6fb190 A32/testenv: Add missing headers 2018-08-15 13:48:50 +01:00
MerryMage
67293289bf externals: Update xbyak to v5.67
Merge commit '1812bd20d08020bfff2ca15e23c0377a21e3cee0'
2018-08-15 13:31:03 +01:00
MerryMage
1812bd20d0 Squashed 'externals/xbyak/' changes from 2794cde7..671fc805
671fc805 update test/cybozu
8ca86231 remove mutable in Address
8b93498f add cmpsb/scasb/...
7eb62750 avoid core_sharing_data_cache = 0 for some cloud envrionment
85767e95 support mingw64
59573e6e add PROTECT_RE mode for protect()
71b75f65 fix push(qword[mem])
811f4959 Merge branch 'rsdubtso-master'
8e3cb711 Account for potentially zero 0xb leaf when parsing cache/topology via cpuid
a816249f update version
fe083912 fix to avoid zero division for some virtual machine
f0a8f7fa update version
cac09b7a Merge pull request #62 from mgouicem/master
1f96b5e0 Fixes an error raised by clang < 3.9
c0f885ac Merge pull request #61 from mgouicem/master
bfe2d201 Change default value for n_cores in setCacheHierarchy.
fd587b55 change format and add getter for data_cache_size
80b3c7b9 remove macro
88189609 Merge branch 'mgouicem-master'
e6b79723 Adding queries to get the cpu topology on Intel architectures.
221384f0 vmov* supports [mem]|k|z
c04141ef define XBYAK_NO_OP_NAMES for test
af7f05ee add const for Label

git-subtree-dir: externals/xbyak
git-subtree-split: 671fc805d09d075f48d4625f183ef2e1ef725106
2018-08-15 13:28:55 +01:00
MerryMage
9a9580290b externals: Document subtrees 2018-08-15 13:28:13 +01:00
Lioncash
714a8405bc A64: Implement SQ{ADD, SUB}, and UQ{ADD, SUB}'s vector variants
Currently we implement these in terms of the scalar variants. Falling
back to the interpreter is slow enough to make it more effective than
doing that.
2018-08-14 08:48:06 +01:00
Lioncash
8cab459661 A64: Implement UQADD/UQSUB's scalar variants 2018-08-14 08:48:06 +01:00
Lioncash
18a8151684 ir: Add opcodes for unsigned saturating add and subtract 2018-08-14 08:48:06 +01:00
Lioncash
a5660eec11 x64/reg_alloc: Use type alias for array returned by GetArgumentInfo()
This way if the number ever changes, we don't need to change the type in
other places.
2018-08-13 21:55:40 +01:00
Lioncash
29489b598e ir/value: Use type alias CoprocessorInfo for std::array<u8, 8>
Provides a more descriptive label for the interface, and avoids the need
to hardcode the array size in multiple places.
2018-08-13 21:55:14 +01:00
MerryMage
e23ba26d88 status_register_access: Add support for bits 0 and 1 of mask to MSR 2018-08-11 21:26:15 +01:00
MerryMage
55190bd792 fuzz_with_unicorn: Split utility functions into fuzz_util 2018-08-11 20:51:30 +01:00
MerryMage
23b049d2fe A32/translate/load_store: Correct detection of writeback 2018-08-11 20:51:30 +01:00
MerryMage
7ec9f15636 A32/translate: Add TranslateSingleInstruction 2018-08-11 20:51:30 +01:00
MerryMage
efeecb46ff A32/ir_emitter: Bug fix: IREmitter::ExceptionRaised using incorrect opcode 2018-08-11 18:18:29 +01:00
MerryMage
08d1d19805 A32/decoders: Split instruction list into include file 2018-08-11 18:18:29 +01:00
MerryMage
2d929cc3b3 tests: Refactor unicorn_emu to allow for A32 unicorn 2018-08-11 18:18:29 +01:00
MerryMage
f672368ac3 microinstruction: Improve assert messages 2018-08-11 10:43:40 +01:00
MerryMage
7ebff50d46 emit_x64_vector: EmitVectorNarrow16: AVX512 implementation 2018-08-10 21:57:58 +01:00
MerryMage
edce230ebe emit_x64_vector: EmitVectorNarrow32: prefer pblendw to loading constant 2018-08-10 21:57:37 +01:00
MerryMage
0118ee04f9 emit_x64_vector: packusdw is SSE4.1 2018-08-10 11:09:49 +01:00
MerryMage
4f96c63025 emit_x64_vector_floating_point: Simplify FPVector{Min,Max} 2018-08-03 11:48:17 +01:00
MerryMage
e15fdfe696 emit_x64_vector_floating_point: Simplify Get*Vector functions 2018-08-03 11:48:17 +01:00
MerryMage
734a00b608 emit_x64_floating_point: Remove EmitProcessNaNs 2018-08-03 11:48:17 +01:00
MerryMage
fd45191e44 devirtualize: Replace DEVIRT macro with function template 2018-08-03 09:09:29 +01:00
MerryMage
67ba5d0072 fuzz_with_unicorn: Remove FCVT_float from ignore list 2018-08-03 08:18:40 +01:00
Lioncash
66e6dd1cab a32_emit_x64: std::move A32::UserConfig in the constructor
This avoids a few redundant atomic increments and decrements,
considering the UserConfig instance contains a std::array of
std::shared_ptr<Coprocessor> instances.
2018-08-03 08:12:36 +01:00
MerryMage
b4890b6f32 emit_x64_floating_point: Use EmitPostProcessNaNs in EmitFPMulX 2018-08-03 07:31:51 +01:00
MerryMage
18b29435f7 emit_x64_floating_point: Remove unnecessary DenormalsAreZero from EmitFPSingleToDouble and EmitFPDoubleToSingle 2018-08-02 21:12:24 +01:00
MerryMage
df1f81f998 emit_x64_floating_point: Simplify EmitFP{Min,Max}{,Numeric}{32,64} 2018-08-02 21:09:35 +01:00
MerryMage
21fb1c3a7f emit_x64_floating_point: Reduce NaN processing overhead 2018-08-02 17:17:23 +01:00
MerryMage
f5c9f0fa5f A64: Implement FMULX, scalar single/double variant 2018-08-02 14:11:30 +01:00
MerryMage
8f4777338e IR: Implement FPMulX IR instruction 2018-08-02 14:11:14 +01:00
MerryMage
79e6440ea0 fuzz_with_unicorn: Randomize SP 2018-08-01 15:30:59 +01:00
MerryMage
33c80e3181 fuzz_with_unicorn: Randomize PC 2018-08-01 15:30:59 +01:00
MerryMage
8d41024661 testenv: Make code_mem mobile 2018-08-01 15:30:59 +01:00
Lioncash
a9fae0e610 emit_x64_vector: Vectorize 32-bit variants of paired min/max
Gets rid of the fallbacks for these cases.
2018-08-01 12:20:01 +01:00
MerryMage
8926a92a03 emit_x64_vector: Improve code emission of VectorGetElement* for index == 0 2018-07-31 22:04:11 +01:00
MerryMage
e20bd387e9 reg_alloc: Do a UseScratch if a Use destination is too small 2018-07-31 21:55:14 +01:00
MerryMage
a19fa0e294 fuzz_with_unicorn: Randomize FPCR.AHP and FPCR.FZ16 2018-07-31 21:27:24 +01:00
MerryMage
775f368205 emit_x64_floating_point: AVX implementation of ForceToDefaultNaN 2018-07-31 21:22:01 +01:00
MerryMage
71018a1faa emit_x64_vector_floating_point: Prefer blendvp{s,d} to vblendvp{s,d} where possible
It's a cheaper instruction.
2018-07-31 21:13:16 +01:00
MerryMage
137f4b3b01 backend_x64: Remove all use of xmm0 2018-07-31 20:54:16 +01:00
MerryMage
e73d67a841 emit_x64_vector_floating_point: AVX implementation of ForceToDefaultNaN 2018-07-31 20:33:50 +01:00
MerryMage
43cca54dd3 emit_x64_vector_floating_point: Reduce codesize of ForceToDefaultNaN 2018-07-31 20:25:56 +01:00
MerryMage
5dc40f49f8 emit_x64_vector_floating_point: Reduce codesize of EmitTwoOpVectorOperation 2018-07-31 20:25:03 +01:00
MerryMage
07622eedf0 emit_x64_vector_floating_point: Correct FMA in FTZ mode
x64 rounds before flushing to zero
AArch64 rounds after flushing to zero

This difference of behaviour is noticable if something would round to a smallest normalized number
2018-07-31 18:12:39 +01:00
MerryMage
621c85b90c emit_x64_floating_point: DenormalsAreZero is redundant as hardware already does DAZ
Exceptions: F{MIN,MAX}{,NM}
2018-07-31 18:05:13 +01:00
MerryMage
3d0ebaa6d6 emit_x64_floating_point: FlushToZero is redundant as hardware already does FTZ 2018-07-31 16:08:13 +01:00
MerryMage
f626ff82d0 backend_x64: Fix FPVectorMulAdd and FPMulAdd NaN handling with denormals
Denormals should be treated as zero in NaN handler
2018-07-31 16:07:46 +01:00
MerryMage
adeb9d9ba0 a32/fuzz_arm: Disable vfp tests 2018-07-31 16:01:28 +01:00
MerryMage
19ea70d3a0 fuzz_with_unicorn: Randomize FPCR.FZ 2018-07-31 15:39:39 +01:00
MerryMage
895db36543 backend_x64: Fix bugs when FPCR.FZ=1
Bugs:
* DenormalsAreZero flushed to positive zero instead of preserving sign.
* FMAXNM/FMINNM (scalar) should perform DAZ *before* special zero handling.
* FMAX/FMIN/FMAXNM/FMINNM (vector) did not DAZ.
2018-07-31 15:39:33 +01:00
MerryMage
d7e2de2659 fuzz_with_unicorn: Extract RandomFpcr function
Deduplicate randomization of fpcr and make use of FP::FPCR
2018-07-31 12:35:04 +01:00
MerryMage
c858d6c7b4 fp/info: Deduplicate functions 2018-07-30 20:25:29 +01:00
MerryMage
5b88ec252c emit_x64_floating_point: Deduplicate EmitFPMulAdd implementation 2018-07-30 20:16:45 +01:00
MerryMage
73d3efc3e0 emit_x64_floating_point: Deduplicate code 2018-07-30 15:13:43 +01:00
MerryMage
c9508c3d13 fuzz_with_unicorn: Randomize FPCR.DN 2018-07-30 14:52:22 +01:00
MerryMage
29708331bb emit_x64_vector_floating_point: Fix FPVector{Max,Min} when FPCR.DN = 1 2018-07-30 14:52:22 +01:00
MerryMage
150764f718 emit_x64_floating_point: Fix FP{Max,Min} when FPCR.DN = 1 2018-07-30 14:52:22 +01:00
MerryMage
b7d209cfa4 IR: SSE4.1 implementation of FPVectorRoundInt 2018-07-30 14:52:22 +01:00
MerryMage
8cf8270139 A64: Implement FRINT{N,M,P,Z,A,X,I} (vector), single/double variant 2018-07-30 13:32:20 +01:00
MerryMage
8f46c26d26 IR: Initial implementation of FPVectorRoundInt 2018-07-30 13:31:51 +01:00
MerryMage
97017bbdf7 A64: Implement SQADD and SQSUB, scalar variant 2018-07-30 11:01:38 +01:00
MerryMage
ce58863903 IR: Generalise SignedSaturated{Add,Sub} to support more bitwidths 2018-07-30 11:01:36 +01:00
MerryMage
e80f8ff244 a64_emit_x64: Bugfix EmitA64OrQC - Incorrect argument 2018-07-30 11:00:37 +01:00
Lioncash
1e4ec7e1f0 simd_three_same: Extract non-paired SMAX, SMIN, UMAX, UMIN code to a common function
Deduplicates a bit of code and makes its layout consistent with the
paired variants
2018-07-30 08:40:32 +01:00
Lioncash
6f9dc9b143 A64: Implement SMAXP, SMINP, UMAXP, UMINP 2018-07-30 08:40:32 +01:00
Lioncash
1dfb29fc14 ir: Add opcodes for vector paired maximum and minimums
For the time being, we can just do a naive implementation which avoids
falling back to the interpreter a bit. Horizontal operations aren't
necessarily x86 SIMD's forte anyways.
2018-07-30 08:40:32 +01:00
Lioncash
017b51095f A64: Implement SMAXV, SMINV, UMAXV, and UMINV 2018-07-30 08:39:33 +01:00
Lioncash
aae22eec26 ir: Add opcodes for performing scalar integral min/max 2018-07-30 08:39:33 +01:00
Lioncash
6ef3af3bc9 A64: Implement PMULL{2} 2018-07-29 10:04:58 +01:00
Lioncash
2a4ce19af3 translate: Deduplicate GetDataSize() functions
Avoids defining the same function multiple times in different files.
2018-07-29 10:00:34 +01:00
Lioncash
0e015008af floating_point_{conditional}_compare: Deduplicate code
Deduplicates the implementation code of instructions by extracting the
code to a common function.
2018-07-29 10:00:34 +01:00
MerryMage
259237ce58 common: Move all cryptographic function to common/crypto 2018-07-29 08:49:12 +01:00
MerryMage
c5f1080b40 a32_emit_x64: BMI2 implementation of A32SetCpsr 2018-07-27 11:41:31 +01:00
MerryMage
a23304a16c a32_emit_x64: Shorten EmitA32GetCpsr 2018-07-27 11:24:06 +01:00
MerryMage
57604d2ea8 a32_emit_x64: Assert that memory layout assumption in EmitA32GetCpsr is valid 2018-07-26 19:26:01 +01:00
Lioncash
945fa48667 A64: Implement PMUL 2018-07-26 16:16:30 +01:00
Lioncash
656a4042a2 ir: Add opcode for performing polynomial multiplication 2018-07-26 16:16:30 +01:00
MerryMage
05143df9d8 A64: Implement FCVT{N,M,A,P}{U,S} (vector), FCVTZU (vector, integer), single/double variant 2018-07-26 12:48:36 +01:00
MerryMage
34ce767a00 A64: Implement FCVTZS (vector, integer), single/double variant 2018-07-26 12:48:36 +01:00
MerryMage
0f9bc2d391 IR: Implement FPVectorTo{Signed,Unsigned}Fixed 2018-07-26 12:48:36 +01:00
MerryMage
0189e4454a fp/info: Replace constant value generators with FPValue
Instead of having multiple different functions we can just have one.
2018-07-26 11:35:35 +01:00
MerryMage
db165684c0 emit_x64_vector_floating_point: AVX implementation of FPVector{Max,Min} 2018-07-26 10:10:47 +01:00
MerryMage
31148bdb42 emit_x64_vector_floating_point: Remove unnecessary double jump in HandleNaNs 2018-07-26 09:42:34 +01:00
Lioncash
4c3ca51e86 A64: Implement FMAX's vector single and double precision variants 2018-07-26 09:32:02 +01:00
Lioncash
bf0f21cc12 A64: Implement FMIN's vector single and double precision variants 2018-07-26 09:32:02 +01:00
MerryMage
76f0ca04d6 IR: Implement FPVector{Max,Min} 2018-07-26 09:31:56 +01:00
MerryMage
6c37c311de FPRecipEstimate: Move offset out of function
MSVC has weird lambda capturing rules.
2018-07-25 19:22:35 +01:00
MerryMage
59546f3c60 microinstruction: Update ReadsFromAndWritesToFPSRCumulativeExceptionBits 2018-07-25 19:17:07 +01:00
MerryMage
3f6b03a06b A64: Implement FRECPS, vector/scalar single/double variants 2018-07-25 19:14:23 +01:00
MerryMage
2d2ca5ebc1 IR: Implement FPRecipStepFused, FPVectorRecipStepFused 2018-07-25 19:14:23 +01:00
MerryMage
5cb9f1dab2 A64: Implement FRECPE, vector single/double variant 2018-07-25 18:55:58 +01:00
MerryMage
c5a14ab21b IR: Implement FPVectorRecipEstimate 2018-07-25 18:55:40 +01:00
MerryMage
56f8a0b172 A64: Implement FRECPE, scalar single/double variant 2018-07-25 18:47:45 +01:00
MerryMage
fde69b4d36 IR: Implement FPRecipEstimate 2018-07-25 18:47:22 +01:00
MerryMage
186e52ca50 IR: Implement FPRecipEstimate 2018-07-25 18:36:40 +01:00
MerryMage
cf2e1aed96 fp: Change FPUnpacked to a normalized representation
Having a known position for the highest set bit makes writing algorithms easier
2018-07-25 17:42:36 +01:00
MerryMage
98e2380129 fuzz_with_unicorn: Disable testing of FDIV 2018-07-25 14:05:13 +01:00
MerryMage
041b7d5e17 block_of_code: Add ABI_PARAMS array 2018-07-25 13:59:14 +01:00
MerryMage
2a2371c7a5 A64: Implement MLA, MLS (by element), vector single/double variant 2018-07-25 13:58:34 +01:00
MerryMage
78c640ad9e A64: Implement FMLS (vector), single/double variant 2018-07-25 13:45:02 +01:00
MerryMage
b6b6993884 emit_x64_vector_floating_point: Specify NanHandler::function_type explicitly
MSVC doesn't like dealing with auto return types
2018-07-25 13:38:32 +01:00
MerryMage
4b9d12a585 emit_x64_vector_floating_point: ChooseOnFsize arguments maybe_unused 2018-07-25 13:27:31 +01:00
MerryMage
b1e3616de2 IR: Implement FPVectorNeg 2018-07-25 13:25:35 +01:00
MerryMage
4343612ec4 A64: Implement FMLA (vector), single/double variant 2018-07-25 13:20:07 +01:00
MerryMage
93eeb25fac IR: Implement FPVectorMulAdd 2018-07-25 13:19:48 +01:00
MerryMage
57e5c7e7a5 emit_x64_vector_floating_point: Standardize naming scheme 2018-07-25 12:08:00 +01:00
MerryMage
bcb9e4106d emit_x64_floating_point: Simplify indexers 2018-07-25 12:05:41 +01:00
MerryMage
83aa5854b6 emit_x64_vector_floating_point: Simplify EmitVectorOperation* 2018-07-25 11:34:22 +01:00
MerryMage
f4087c81e5 mp: rename mp.h to mp/function_info.h 2018-07-25 11:28:36 +01:00
MerryMage
18640903ac emit_x64_vector: Slightly improve ArithmeticShiftRightByte 2018-07-25 09:33:02 +01:00
MerryMage
e048441d44 emit_x64_vector: Simplify VectorShuffleImpl 2018-07-24 22:46:45 +01:00
MerryMage
ff025e88d0 IR: Implement A64OrQC 2018-07-24 19:04:40 +01:00
MerryMage
6fac68dd1d A64: Implement UQSHRN, UQRSHRN (vector) 2018-07-24 18:54:28 +01:00
MerryMage
5a8d9c3487 emit_x64_vector: -0x80000000 isn't -0x80000000 2018-07-24 18:45:45 +01:00
MerryMage
759289ec5c A64: Implement UQXTN (vector) 2018-07-24 18:31:32 +01:00
MerryMage
2a96281587 emit_x64_vector: Fix non-SSE4.1 saturated narrowing reconstruction comparison
Allows non-SSE4.1 to produce the correct FPSR.QC flag
2018-07-24 18:17:14 +01:00
MerryMage
0682353626 A64: Implement SQXTN (vector) 2018-07-24 17:59:14 +01:00
MerryMage
6c5229ed47 emit_x64_vector: packusdw reqiures SSE4.1
In EmitVectorSignedSaturatedNarrowToUnsigned32.
2018-07-24 17:32:00 +01:00
MerryMage
158d9b16f0 A64: Implement SQSHRUN, SQRSHRUN (vector) 2018-07-24 17:20:49 +01:00
MerryMage
f886013526 simd_shift_by_immediate: Simplify ShiftRight 2018-07-24 16:38:51 +01:00
MerryMage
d9b59c69de A64: Implement SQXTUN 2018-07-24 16:32:10 +01:00
MerryMage
50fe28b976 microinstruction: Reorganize FPSCR related instruction queries 2018-07-24 12:13:18 +01:00
Lioncash
d9d036acc9 microinstruction: Add missing FP scalar opcodes to ReadsFromFPSCR() and WritesToFPSCR()
These were forgotten when the opcodes were added.
2018-07-24 11:55:15 +01:00
Lioncash
db96163637 u128: Make Bit() a const-qualified member function
This function doesn't modify the struct members, so it can be made
const.
2018-07-24 09:15:44 +01:00
MerryMage
f7052ae04d A64: Implement FRSQRTS (vector), single/double variant 2018-07-23 22:58:52 +01:00
MerryMage
0925ef6248 A64: Implement FRSQRTE (vector), single/double variant 2018-07-23 22:46:12 +01:00
MerryMage
f4cbbe3218 A64: Implement FRSQRTS (scalar), single/double variant 2018-07-23 22:05:17 +01:00
MerryMage
4ef864e81c IR: Implement FPRSqrtStepFused 2018-07-23 22:05:17 +01:00
MerryMage
9dffeebc44 fp: Implement FPRSqrtStepFused 2018-07-23 22:05:17 +01:00
MerryMage
aa0455667e fp: Implement FPNeg 2018-07-23 22:03:07 +01:00
MerryMage
cbde1c5a15 process_nan: Add two operand variant 2018-07-23 22:03:07 +01:00
Lioncash
1ec2663de3 A64: Implement FMAXP, FMINP, FMAXNMP and FMINNMP's scalar double/single-precision variant 2018-07-23 21:22:32 +01:00
MerryMage
027ddf9e2c emit_x64_floating_point: Fixup special NaN case in FMA FPMulAdd implementation 2018-07-23 21:10:52 +01:00
Lioncash
75a9f7799a fp: Use a forward declaration in fused.h
It's permissible to forward declare here, so we can do so and eliminate
a direct header dependency
2018-07-23 20:46:34 +01:00
Lioncash
1ee16303bd u128: Implement comparison operators in terms of one another
We can just implement the comparisons in terms of operator< and
implement inequality with the negation of operator==.
2018-07-23 20:23:10 +01:00
MerryMage
3b77f48a76 tests: Print cpu info 2018-07-23 20:22:38 +01:00
MerryMage
bed3cc03f9 u128: StickyLogicalShiftRight requires special-casing for amount == 64
In this case (128 - amount) == 64, and this invokes undefined behaviour
2018-07-23 20:22:01 +01:00
Lioncash
15d04f489b A64: Implement FMLA and FMLS (by element)'s double/single-precision scalar variant 2018-07-23 19:13:39 +01:00
Lioncash
7cfccdfa29 A64: Implement FMUL (by element)'s scalar double/single-precision variant 2018-07-23 19:13:39 +01:00
MerryMage
7d2d62ece7 emit_x64_floating_point: Implement accurate fallback for FPMulAdd{32,64} 2018-07-23 18:52:09 +01:00
MerryMage
a599eacebf fp: Implement FPMulAdd 2018-07-23 18:52:07 +01:00
MerryMage
d70b90ed5d process_nan: Add FPProcessNaNs3 2018-07-23 18:51:36 +01:00
MerryMage
38ef0e04cb block_of_code: Add SysV ABI fifth and sixth parameters 2018-07-23 18:51:36 +01:00
MerryMage
8e2ff56569 u128: Add StickyLogicalShiftRight 2018-07-23 18:51:36 +01:00
MerryMage
3b337df076 u128: Add Multiply64To128 2018-07-23 18:51:36 +01:00
MerryMage
8219075ea3 u128: Add u128::Bit 2018-07-23 18:51:11 +01:00
MerryMage
a574dcb2ae u128: Add comparison operators 2018-07-23 18:51:11 +01:00
MerryMage
391d6d46a4 unpacked: Use ResidualErrorOnRightShift in FPRoundBase
Fixes a bug relating to exponents that are severely out of range.
2018-07-23 18:29:44 +01:00
MerryMage
5e0cf9c83e fp: Remove MantissaT 2018-07-23 14:23:47 +01:00
MerryMage
8c0a84cbd3 FPRSqrtEstimate: Improve documentation of RecipSqrtEstimate 2018-07-23 11:26:51 +01:00
Lioncash
c41d8552a7 FPRSqrtEstimate: Deduplicate array bounds
Dehardcodes a few constants in the loops.
2018-07-23 10:56:46 +01:00
Lioncash
4cf055ba47 A64: Implement FMAXV, FMINV, FMAXNMV, and FMINNMV 2018-07-23 10:45:12 +01:00
Lioncash
bf24f0febf FPRSqrtEstimate: Use forward declarations where applicable 2018-07-23 10:36:49 +01:00
Lioncash
206230e9c4 translate: Return by bool in helpers where applicable
Gets rid of a bit of duplication regarding the early-out cases and makes
all helpers functions consistent (previously some had a return type of
bool, while others had a return type of void).
2018-07-23 10:36:28 +01:00
Lioncash
346b725878 Simplify fallback case for EmitVectorSetElement64() 2018-07-23 10:34:44 +01:00
MerryMage
2c34e1d964 emit_x64_floating_point: s/Esimate/Estimate/ 2018-07-22 21:49:08 +01:00
MerryMage
5213fb670d simd_scalar_two_register_misc: Implement FRSQRTE, scalar variant 2018-07-22 18:35:43 +01:00
MerryMage
7ed089fd8e IR: Implement FPRSqrtEstimate 2018-07-22 18:35:43 +01:00
MerryMage
cd2e286313 simd_vector_x_indexed_element: Implement FMUL (by element), vector variant 2018-07-22 17:43:08 +01:00
MerryMage
fc6b73bd85 a64_emit_x64: Ensure host has updated ticks in EmitA64GetCNTPCT
Discovered by @Subv.
Fixes incomplete fix begun in 5a91c94dca47c9702dee20fbd5ae1f4c07eef9df.
That fix fails to take into account that LinkBlock doesn't update ticks until there
are no remaining ticks to be executed.

Test added to confirm fix.
2018-07-22 16:16:26 +01:00
MerryMage
888c6783a1 a64_emit_x64: Fix stack misalignment on Windows for 128-bit exclusive writes
Discovered by @Subv.
Includes a test to ensure this codepath is exercised on Windows.
2018-07-22 15:26:25 +01:00
Lioncash
352d53908a emit_x64_aes: Eliminate extraneous usage of a scratch register in EmitAESInverseMixColumns()
We can just use the same register the data is in as the result register,
eliminating the need to use a completely separate register to store the
result.
2018-07-22 07:06:09 +01:00
Lioncash
ab7fe77799 A64: Implement SADDLV 2018-07-22 07:05:36 +01:00
Lioncash
09bd2b2c6e A64: Implement UADDLV 2018-07-22 07:05:36 +01:00
Lioncash
62e86d7287 fp: Use forward declarations where applicable
Minimizes the amount of files that need to be rebuilt if the headers
ever change.
2018-07-22 07:04:47 +01:00
Lioncash
b3edb7a956 emit_x64_vector: Append 'v' prefix onto movq in AVX path
This is something I missed when adding in the AVX broadcast code.
2018-07-22 07:04:35 +01:00
Subv
7ea1241953 A64: The A64SetTPIDR IR instruction writes to a system register and should not be eliminated by the dead code elimination pass.
Previously this instruction was alway eliminated, resulting in incorrect values for TPIDR_EL0.
2018-07-21 09:34:23 +01:00
MerryMage
853bdd6b98 fp: A64::FPCR -> FP::FPCR 2018-07-20 11:39:39 +01:00
MerryMage
faa3ea2f2a bit_util: Implement ClearBits and ModifyBits 2018-07-20 11:39:30 +01:00
MerryMage
f659f0fb5c system: Simplify static_cast 2018-07-19 12:03:23 +01:00
Lioncash
9db6794f59 externals: Update Xbyak to 5.65 2018-07-19 10:43:26 +01:00
MerryMage
5a91c94dca system: Ensure value of CNTPCT_EL0 is accurate
Since we currently only update the host's tick count at the end of a
block, we force an end-of-block before executing a MRS %, CNTPCT_ELO
instruction.
2018-07-19 02:37:28 +01:00
Lioncash
1e303aa1f3 safe_ops: Avoid cases where shift bases are invalid with signed values
For example, say the converted signed type is s64, shifting left  by 63
bits would be undefined behavior.

However, given an ASL is essentially the same behavior as an LSL
we can just use an unsigned type instead of converting to a signed type.
2018-07-17 21:24:34 +01:00
Lioncash
e3d533d954 safe_ops: Avoid signed overflow in Negate()
Negation of values such as -9223372036854775808 can't be represented in
signed equivalents (such as long long), leading to signed overflow.
Therefore, we can just invert bits and add 1 to perform this behavior
with unsigned arithmetic.
2018-07-17 21:24:34 +01:00
Lioncash
6bf7280179 simd_scalar_shift_by_immediate: Implement FCVT{ZS, ZU} (vector, fixed-point)'s scalar double/single-precision variant 2018-07-17 19:45:58 +01:00
Lioncash
be860cf7e1 simd_scalar_two_register_misc: Implement FCVT{AS, AU, MS, MU, NS, NU, PS, PU, ZS, ZU} (vector)'s scalar double/single-precision variants
We can simply implement this in terms of the fixed-point IR opcodes.
2018-07-17 19:45:58 +01:00
Lioncash
cae96d1da5 tests: Silence warnings in skyeye code
Gets rid of warning noise when compiling the tests.
2018-07-17 19:44:10 +01:00
Lioncash
adbb8964c6 emit_x64: Remove FPSCR_RoundTowardsZero() virtual function from EmitContext struct
This code was bugged in that we were comparing if the rounding mode was
not equal to rounding towards zero. Fortunately, however, nothing uses
this function anymore, and there's already the more general
FPSCR_RMode() available, so this can be removed entirely.
2018-07-17 19:27:33 +01:00
Lioncash
6bcc766729 emit_x64: Add missing <array> include
Commit 755adef62e504a8d616de9dda8937d2428a9471b introduced a helper
alias for std::array, eliminating the need to manually type out sizes
for them, however I forgot to add the include for <array>
2018-07-17 19:00:00 +01:00
Lioncash
755adef62e emit_x64_vector{_floating_point}: Add helper alias for sizing arrays relative to vector width
Avoids needing to remember to specify the proper size of the arrays, all
that's needed is to specify the type of the array and the size will
automatically be deduced from it. This helps prevent potential oversized
or undersized arrays from being specified.
2018-07-17 17:54:22 +01:00
MerryMage
0c3b6bd11f A64/PopRSBHint: Prevent RETing to a guest PC of ~0ull from crashing the jit 2018-07-16 18:29:25 +01:00
MerryMage
5ae55914e2 tests: Add FABD test 2018-07-16 16:55:26 +01:00
MerryMage
39958434b6 A64: Implement FABD in terms of existing IR instructions
Fixes NaN issue. Closes #306.
2018-07-16 16:51:16 +01:00
MerryMage
4a3453179b FPRoundInt: Final FPRound based on new sign
While this shouldn't change any of the results in theory, it's just logically more consistent
2018-07-16 15:07:26 +01:00
MerryMage
5879b5f73f emit_x64_floating_point: SSE4.1 implementation of EmitFPRound 2018-07-16 14:22:29 +01:00
MerryMage
a981d3ffb1 A64: Implement FRINTX, FRINTI (scalar) 2018-07-16 14:10:53 +01:00
MerryMage
aa315c97b9 A64: Implement FRINTP, FRINTM, FRINTZ (scalar) 2018-07-16 14:10:53 +01:00
MerryMage
80aa4f49e6 A64: Implement FRINTN (scalar) 2018-07-16 14:10:53 +01:00
MerryMage
eaf4106620 A64: Implement FRINTA (scalar) 2018-07-16 14:10:53 +01:00
MerryMage
48166d80cd IR: Implement FPRoundInt 2018-07-16 14:10:53 +01:00
MerryMage
f600f48bdd fp: Implement FPRoundInt 2018-07-16 13:50:37 +01:00
MerryMage
a8952a521b fp: Implement FPProcessNaN 2018-07-16 13:50:37 +01:00
MerryMage
4ba4ed2dca fp/info: Add DefaultNaN 2018-07-16 13:50:37 +01:00
MerryMage
b08e49d337 fp: Move FPToFixed to its own file 2018-07-16 13:50:37 +01:00
MerryMage
814092c5be a64_jit_state: Add FPSR.QC flag 2018-07-16 13:50:37 +01:00
Lioncash
54c6d119ba emit_x64_vector: Use non-scratch Use* variants of registers within EmitVectorUnsignedAbsoluteDifference()
In some cases, a register isn't modified, depending on the branch taken,
so we can signify this by using the non-scratch variants in certain
cases.
2018-07-16 10:35:51 +01:00
Lioncash
ca579d2603 simd_scalar_two_register_misc: Implement scalar double/single-precision variants of FCM{EQ, GE, GT, LE, LT} (zero) 2018-07-16 10:35:26 +01:00
Lioncash
3b3e1c0991 translate_arm: Remove unnecessary rotr() function
We already have RotateRight() in our common code, so we can remove this
function and replace it with it. We can also implement ArmExpandImm_C()
in terms of ArmExpandImm().
2018-07-16 10:32:46 +01:00
Merry
dda07710e1
Merge pull request #309 from lioncash/typename
cast_util: Remove unnecessary typename
2018-07-16 10:18:03 +01:00
Lioncash
13df147ffb
cast_util: Remove unnecessary typename
Given we use std::aligned_storage_t, we don't need to specify
typename here. If we used std::aligned_storage, then we would need to.
2018-07-15 19:38:02 -04:00
MerryMage
41074a2547 A64: Implement FADDP (scalar) 2018-07-15 22:49:58 +01:00
MerryMage
59e78dc57e A64: Implement FADDP (vector) 2018-07-15 22:49:58 +01:00
MerryMage
dfdec797e3 A64: Implement SADDLP 2018-07-15 18:50:09 +01:00
MerryMage
3bb6a432d8 A64: Implement UADDLP 2018-07-15 18:26:54 +01:00
MerryMage
c103a28386 A64: Implement EXT 2018-07-15 17:47:32 +01:00
Merry
f23475764f
Merge pull request #289 from MerryMage/fptofixed
Implement most of the scalar fp -> integer instructions
2018-07-15 17:12:52 +01:00
MerryMage
d870a75417 emit_x64_floating_point: SSE4.1 implementation for FP{Double,Single}ToFixed{S,U}{32,64} 2018-07-15 17:03:40 +01:00
MerryMage
f0910c357a A64: Implement FCVTMU (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
dd6772786e A64: Implement FCVTMS (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
5b82fa8018 A64: Implement FCVTPU (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
79c4e922db A64: Implement FCVTPS (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
128db2f62a A64: Implement FCVTAU (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
bb92f95b9d A64: Implement FCVTAS (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
8cad14eee6 A64: Implement FCVTNU (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
d3e8cf3e15 A64: Implement FCVTNS (scalar) 2018-07-15 15:37:29 +01:00
MerryMage
ec0c7e1acd floating_point_conversion_integer: Refactor implementation of FCVTZS_float_int and FCVTZU_float_int 2018-07-15 15:37:29 +01:00
MerryMage
2f567fe003 IR: Initial implementation of FP{Double,Single}ToFixed{S,U}{32,64}
This implementation just falls-back to the software floating point implementation.
2018-07-15 15:37:29 +01:00
MerryMage
564c1b091f EmitContext: Expose FPCR 2018-07-15 15:37:29 +01:00
MerryMage
5e16785b3a fp/op: Implement FPToFixed 2018-07-15 15:37:29 +01:00
MerryMage
b5658dc310 mantissa_util: Implement ResidualErrorOnRightShift
Accurately calculate residual error that is shifted out
2018-07-15 15:37:29 +01:00
MerryMage
4425da9684 tests/fp: Add FPRound tests 2018-07-15 15:37:28 +01:00
MerryMage
cbedf2d498 fp/unpacked: Implement FPRound 2018-07-15 15:37:28 +01:00
MerryMage
b4cf436bfa FPCR: Add AHP setter and FZ16 getter 2018-07-15 15:37:28 +01:00
MerryMage
50ec57e372 mp: Implement metaprogramming library 2018-07-15 15:37:28 +01:00
MerryMage
64f4d14b39 fp: Implement FPUnpack 2018-07-15 14:32:06 +01:00
MerryMage
909e9aae2e fp: Implement FPProcessException 2018-07-15 14:32:06 +01:00
MerryMage
f6cdd58976 fp: Move fp_util to fp/util 2018-07-15 14:32:06 +01:00
MerryMage
60f5ef3a11 fp: Add FPSR 2018-07-15 14:32:06 +01:00
MerryMage
2384b7e6a0 fp: Add FPInfo
Provides information about floating-point format for various bit sizes
2018-07-15 14:32:06 +01:00
MerryMage
af82bc4871 safe_ops: Implement safe shifting operations
Implement shifiting operations that perform consistently across architectures
without running into undefined or implemented-defined behaviour.
2018-07-15 14:32:06 +01:00
MerryMage
a3a8efb018 bit_util: Implement MostSignificantBit 2018-07-15 14:32:06 +01:00
MerryMage
3f2194dcba bit_util: Use Ones to implement Bits 2018-07-15 14:32:06 +01:00
MerryMage
c319c4a193 bit_util: Add ClearBit and ModifyBit 2018-07-15 14:32:06 +01:00
MerryMage
639b0bb493 u128: Implement u128
For when we need a 128-bit integer
2018-07-15 14:32:06 +01:00
Lioncash
6c6cdcec10 A64: Implement UCVTF (vector, integer)'s double/single-precision variant 2018-07-15 12:46:35 +01:00
Lioncash
d921423160 ir: Add opcodes for vector conversion of u32/u64 to floating-point 2018-07-15 12:46:35 +01:00
Lioncash
8754289927 simd_three_different: Deduplicate common implementations
Generally, the only difference between the signed variants and the
unsigned variants is whether or not we use a sign-extension or
zero-extension, so we can simply use common functions to implement both
cases without totally duplicating code twice here.
2018-07-15 12:44:49 +01:00
Lioncash
c396261092 floating_point_conversion_integer: Handle S64/U64 -> F32 conversions in SCVTF_float_int and UCVTF_float_int 2018-07-15 12:29:26 +01:00
Lioncash
0b2c6c4eb8 ir: Add opcodes for converting S64 and U64 to single-precision floating-point values 2018-07-15 12:29:26 +01:00
Lioncash
1dc24b6d2e constant_pool: Remove unnecessary std::memset from constructor
AllocateFromCodeSpace() already zeroes out the allocated memory.
2018-07-15 12:12:28 +01:00
MerryMage
9dd908de1d fuzz_with_unicorn: Avoid self-modifying code
* Don't immediately terminate when unicorn raises an interrupt
* Detect self-modifying code
2018-07-15 12:07:52 +01:00
MerryMage
b81a9a52e1 fuzz_with_unicorn: Configure as per qemu max configuration 2018-07-14 08:51:08 +01:00
Lioncash
751bc31b60 tests/A32/testenv: Add type aliases for register arrays
Allows avoiding duplicating std::array instance sizes and types.
2018-07-14 08:22:18 +01:00
Lioncash
badc29f2ea tests/unicorn: Add type aliases to the Unicorn class
Centralizes all register and vector array definitions to a single set of
aliases, so if these are ever changed, then the rest of the testing code
will follow suit without the need to manually change them.
2018-07-14 08:22:18 +01:00
Lioncash
ca7a35f55f A64: Implement ADDV 2018-07-14 08:18:51 +01:00
Lioncash
5b5d79144e emit_x64_vector: Vectorize fallback path for EmitVectorMaxU32() 2018-07-14 08:17:46 +01:00
Lioncash
563959908b simd_three_same: Join FPAbsoluteComparison() into FPCompareRegister()
These are part of the same comparison family, so there's no real point
in keeping them separate.
2018-07-14 07:50:37 +01:00
Lioncash
7391f70318 A64: Implement scalar double/single-precision variants of FACGE, FACGT, FCMEQ, FCMGE, FCMGT 2018-07-14 07:50:37 +01:00
MerryMage
dbfdb2506a emit_x64_floating_point: Fix EmitFPU64ToDouble for TowardsMinusInfinity rounding mode 2018-07-14 07:11:32 +01:00
MerryMage
e292ac2e7b backend_x86: Add FPSCR_RMode to EmitContext 2018-07-14 07:11:32 +01:00
MerryMage
22cd3bac86 tests/A64: Randomize FPCR.RMode for single random instruction 2018-07-14 07:11:32 +01:00
MerryMage
c277e6f988 fp: Extract common RoundingMode enum 2018-07-14 07:11:32 +01:00
Lioncash
1bfac4aed0 inst_gen: Compress loop into std::any_of in IsInvalidInstruction()
Same behavior, but using a more self-documenting function.
2018-07-13 18:28:38 +01:00
Lioncash
a665470545 fuzz_with_unicorn: Move std::vector outside loop in small random block test case
Avoids constructing and destructing the vector repeatedly, we can just
alter the contents of the vector on each iteration instead. Also move
out the std::array instances as well, like with the floating-point test
case and the single random instruction test case.

We can also use the regular form of std::generate and avoid hardcoding
size values twice.
2018-07-13 14:48:09 +01:00
MerryMage
537df2e0b8 fuzz_with_unicorn: Temporarily disable FDIV 2018-07-12 22:34:58 +01:00
MerryMage
28786e6ee2 tests/A64: Test small blocks 2018-07-12 22:34:58 +01:00
MerryMage
fc5870d592 fuzz_with_unicorn: Randomize FPCR.RMode 2018-07-12 13:52:29 +01:00
Lioncash
d2406bf42b floating_point_conversion_integer: Use FPS64ToDouble and FPU64ToDouble in SCVTF_float_int and UCVTF_float_int
The opcodes introduced in 979b6f39f1621b80bd463645ec5b08661cb6b1bf can
also be used here, avoiding more falling back to the interpreter.
2018-07-10 00:27:10 +01:00
Lioncash
6fc9e127fe simd_scalar_two_register_misc: Handle 64-bit case in SCVTF and UCVTF's scalar double/single-precision variant
Avoids falling back to the interpreter in the 64-bit case.
2018-07-10 00:15:19 +01:00
Lioncash
08572fa670 emit_x64_floating_point: Correct use of UseGpr() in EmitFPU32ToDouble() and EmitFPU32ToSingle()
In the non-AVX512 path, the following code is present:

code.mov(from.cvt32(), from.cvt32());

since this potentially modifies 'from', we should be using
UseScratchGpr() instead.
2018-07-10 00:15:19 +01:00
Lioncash
c121a7c611 emit_x64_floating_point: Add AVX512F conversion operations to EmitFPU32ToSingle() and EmitFPU32ToDouble()
AVX-512F provides convenient instructions for these kinds of conversions
directly
2018-07-10 00:15:19 +01:00
Lioncash
979b6f39f1 ir: Add opcodes for converting S64 and U64 to double-precision values 2018-07-10 00:15:19 +01:00
MerryMage
5573953428 Merge branch 'global_monitor' 2018-07-07 22:52:50 +01:00
Lioncash
0ae8540234 simd_two_register_misc: Utilize FPVectorAbs in FABS implementations
Since we already have opcodes introduced to implement FACGE and FACGT,
we can reutilize it for the FABS implementations.
2018-07-07 21:42:42 +01:00
Lioncash
c566307b87 ir: Extend FPVectorAbs opcode to also handle 16-bit elements for FP16 2018-07-07 21:42:42 +01:00
Lioncash
9760ea1f93 A64: Implement FACGE's vector single/double precision variants 2018-07-07 14:49:47 +01:00
Lioncash
488ebdb793 A64: Implement FACGT's vector single/double precision variants 2018-07-07 14:49:47 +01:00
Lioncash
f769be89dc ir: Add opcodes for performing vector absolute floating-point values
This will be usable for implementing FACGE and FACGT
2018-07-07 14:49:47 +01:00
Lioncash
402032d107 emit_x64_vector: Deduplicate a bit of code in EmitVectorSetElement{8, 32, 64} functions
Given both branches are the same, we can hoist out the common code.
2018-07-07 14:49:14 +01:00
Lioncash
f7d11baa1c A64: Implement load/store single structure instructions
Implements LD{1, 2, 3, 4}, LD{1, 2, 3, 4}R, and ST{1, 2, 3, 4} single
structure variants.
2018-07-06 23:01:35 +01:00
Lioncash
c4be14d5bf emit_x64_vector: Deduplicate a bit of code within EmitVectorGetElement8()
Given both branches use the same destination register size, we can hoist
the common code out.
2018-07-06 23:00:58 +01:00
MerryMage
a6432b7e5b A64: Add ClearExclusiveState method 2018-07-04 00:05:14 +01:00
MerryMage
86cd8c9a69 tests: Add print_info program
Eases debugging by printing out dynarmic IR for a given A64 instruction, along with
information about what instruction dynarmic thinks it is.

Also prints an LLVM disassembly of the instruction.
2018-06-27 21:23:14 +01:00
MerryMage
f4e824d396 ir/basic_block: Add missing U16 immediate type to DumpBlock 2018-06-27 21:23:05 +01:00
MerryMage
89a2b80c1f llvm_disassemble: Allow disassembly of invalid AArch64 instructions 2018-06-27 21:22:53 +01:00
Lioncash
11941f70e1 externals: Update catch to v2.2.3
Keeps the unit-testing library up to date.
2018-06-09 22:33:57 +01:00
Lioncash
96c4b1e793 A64: Implement FABD's scalar single/double precision variant 2018-06-09 10:28:45 +01:00
Lioncash
2b0df59e7b A64: Implement FABD's vector single/double precision variant 2018-06-09 10:28:45 +01:00
Lioncash
cfeda05286 ir: Add opcode for performing FP vector absolute differences 2018-06-09 10:28:45 +01:00
MerryMage
c15c9e7049 A64: Implement FNMSUB 2018-06-08 15:23:44 +01:00
MerryMage
6ad682c1c4 A64: Implement FNMADD 2018-06-08 15:23:42 +01:00
MerryMage
a0093c031f A64: Implement FMSUB 2018-06-08 15:23:40 +01:00
MerryMage
4a2c374500 A64: Implement FMADD 2018-06-08 15:23:37 +01:00
MerryMage
f05cb06244 IR: Implement FPMulAdd 2018-06-08 15:23:35 +01:00
Lioncash
0299f05698 A64: Implement FCMGT, FCMGE (register) vector double and single precision variants 2018-06-05 17:21:35 +01:00
Lioncash
7454c8a93a A64: Implement FCMGT, FCMGE, FCMLE, FCMLT (zero) vector double and single precision variants. 2018-06-05 17:21:35 +01:00
Lioncash
21a38854e5 ir: Add opcode for floating-point GE and GT comparisons
The rest of the comparisons can be implemented in terms of these two
2018-06-05 17:21:35 +01:00
MerryMage
614840940e a64_emit_x64: Clear exclusive state in EmitA64CallSupervisor
The kernel would have to execute an ERET instruction to return to
userland; this clears exclusive state.
2018-06-05 13:05:41 +01:00
MerryMage
f915f0860c Implement global exclusive monitor 2018-06-05 12:27:37 +01:00
MerryMage
169c1a07ca a64_emit_x64: Simplify EmitExclusiveWrite 2018-06-05 12:26:05 +01:00
MerryMage
7e31103cf8 CMakeLists: Add missing files 2018-06-05 12:25:16 +01:00
Lioncash
9d27e78989 A64: Implement FCMEQ (zero)'s vector single and double precision variant 2018-06-03 21:49:06 +01:00
Lioncash
0ca366b94e A64: Implement FCMEQ (register)'s vector single and double precision variant 2018-06-03 21:49:06 +01:00
Lioncash
239d2243c0 ir: Add opcodes for floating-point vector equalities 2018-06-03 21:49:06 +01:00
Lioncash
7dc6b5abb3 fuzz_with_unicorn: Make float_numbers in floating-point tests constexpr
Given this is just a lookup table, this can be made immutable.
2018-06-02 16:47:13 +01:00
Lioncash
06c1cf6721 emit_x64_vector: Vectorize fallback case in EmitVectorMultiply64()
Gets rid of the need to perform a fallback.
2018-05-26 21:33:46 +01:00
Lioncash
b747b67354 emit_x64_vector: Add break to final case in EmitVectorRoundingHalvingAddUnsigned()
This doesn't alter behavior but does make the code better if anything
else is ever added to this function in the future.
2018-05-26 21:25:14 +01:00
Lioncash
c623a94a4d A64: Implement SRHADD and URHADD 2018-05-26 11:48:56 +01:00
Lioncash
2652e92928 ir: Add opcodes for performing rounding halving adds 2018-05-26 11:48:56 +01:00
Lioncash
990a569b7a emit_x64_vector: Simplify AVX-512 codepath in EmitVectorMultiply64
I realized I introduced a helper for simple AVX operation emitting, so
use that instead of writing it all out long-form.
2018-05-23 08:02:12 +01:00
Lioncash
66c5d8fb06 A64: Implement UMLAL{2}, UMLSL{2}, and UMULL{2}
Now that we have the helper function set up for the signed variants, we
can also modify it to be used with the unigned ones by performing a zero
extension instead of a sign extension.
2018-05-23 07:58:41 +01:00
Lioncash
5f53fd2be8 A64: Implement SMLSL{2} 2018-05-23 07:58:41 +01:00
Lioncash
b6ed3f9c66 A64: Implement SMLAL{2} 2018-05-23 07:58:41 +01:00
Lioncash
2bfe1ce838 A64: Implement SMULL{2} 2018-05-23 07:58:41 +01:00
Lioncash
be453b0e1c fuzz_with_unicorn: Remove exclusion of FMOV (imm) for FP-16 floats
Qemu, or rather, Unicorn now supports FP-16, since I backported support
for the recent changes to mainline Qemu relating to FP-16 support.
2018-05-19 12:25:43 +01:00
Lioncash
1f00e53b54 A64: Implement SABAL/SABAL2 and SABDL/SABDL2
Now that we have a helper function for the unsigned variants, we can
modify it to also be usable with the signed variants.
2018-05-14 23:10:01 +01:00
Lioncash
de3b545e57 A64: Implement UABAL/UABAL2 2018-05-14 23:10:01 +01:00
Lioncash
e1ab52c057 A64: Implement UABDL/UABDL2 2018-05-14 23:10:01 +01:00
Lioncash
7cd0ff18bf emit_x64_vector: Emit VPMULLQ in EmitVectorMultiply64 on AVX-512{DQ, VL} capable CPUs
Shortens code-gen down to a single instruction in the 64-bit path.
2018-05-14 23:09:31 +01:00
Lioncash
f8f4f9abb4 A64: Implement LDR (literal, SIMD&FP) 2018-05-14 23:09:15 +01:00
Lioncash
b00f6d1044 Correct typo in DataCacheOperation enum
Fixes a typo for the InvalidateByVAToPoC enum entry. Given yuzu is the
only known user of 64-bit mode and it doesn't use this value, we can get
away with changing this.
2018-05-14 15:39:08 +01:00
Lioncash
ced64f7dda A64: Implement FABS' half-precision variant 2018-05-12 11:17:46 +01:00
Lioncash
672641de2c A64: Implement FABS' single and double precision variant 2018-05-12 11:17:46 +01:00
Lioncash
34e1b030dd A64: Implement URSHR (scalar) and URSRA (scalar)
Now that the utility function is all set up from implementing SRSRA, the
unsigned variants can now be trivially implemented by modifying the
utility function to perform a logical shift right instead of an
arithmetical shift right for the unsigned case.
2018-05-12 11:17:19 +01:00
Lioncash
e662942ee3 A64: Implement SRSRA (scalar) 2018-05-12 11:17:19 +01:00
Lioncash
4a81075641 A64: Implement SRSHR (scalar) 2018-05-12 11:17:19 +01:00
Lioncash
ae666903c4 A64: Implement SABA 2018-05-12 11:16:42 +01:00
Lioncash
1629beed25 A64: Implement SABD 2018-05-12 11:16:42 +01:00
Lioncash
d7951233bd ir: Add opcodes for signed absolute differences 2018-05-12 11:16:42 +01:00
Tillmann Karras
0718ee4482 decoder_detail: use structured bindings 2018-05-12 11:15:39 +01:00
Lioncash
cee8bfa797 CMakeLists: Add detection for Aarch64 compiler environments
Just closes a small hole in architecture detection for the ARM family.
2018-05-10 00:35:50 +01:00
Lioncash
e0faf3277e simd_two_register_misc: Handle 64-bit case for SCVTF_int_4 2018-05-08 18:14:50 +01:00
Lioncash
b166981ff5 ir: Add opcode to perform the vector conversion S64->F64
Unfortunately x86 prior to AVX-512 doesn't really give us any convenient instruction to do the work for us
2018-05-08 18:14:50 +01:00
Lioncash
4d2c5184ff A64: Implement SHLL/SHLL2 2018-05-08 17:57:55 +01:00
Lioncash
ae57f6eb58 A64: Add missing decoding for PRFM (unscaled offset) 2018-05-08 15:01:53 +01:00
Lioncash
3e0861d013 A64: Implement UHSUB 2018-05-07 19:04:10 +01:00
Lioncash
93255e6dbd A64: Implement SHSUB 2018-05-07 19:04:10 +01:00
Lioncash
a0e3943ade ir: Add opcodes for performing vector halving subtracts 2018-05-07 19:04:10 +01:00
Lioncash
b4a2d497f9 A64: Implement SM4EKEY 2018-05-07 19:01:22 +01:00
Lioncash
4372700ec9 A64: Implement SM4E 2018-05-07 19:01:22 +01:00
Lioncash
284afd18cb ir: Add an opcode for doing an SM4 lookup table query 2018-05-07 19:01:22 +01:00
Lioncash
97a9fce094 emit_x64_vector: Use VPOPCNTB in EmitVectorPopulationCount() if AVX-512 BITALG is available 2018-05-07 16:40:28 +01:00
Lioncash
f5fe2af89c fuzz_with_unicorn: Silence unused variable warning
Currently, structured bindings don't provide a way to ignore unused variables.
2018-05-07 16:39:42 +01:00
Lioncash
a86f56eb43 externals: Update Catch to v2.2.2
Keeps the unit-testing library up to date.
2018-05-07 16:39:42 +01:00
Lioncash
6d0b58039e A64: Implement UHADD 2018-05-07 16:39:17 +01:00
Lioncash
e4efd365fb A64: Implement SHADD 2018-05-07 16:39:17 +01:00
Lioncash
1da4671b53 ir: Add opcodes for performing halving adds 2018-05-07 16:39:17 +01:00
Lioncash
fae2d940f2 emit_x64_vector: Emit VPMINSQ and VPMINUQ for 64-bit vector min operations if AVX-512VL is available 2018-05-04 07:52:22 +01:00
Lioncash
ec66d94121 emit_x64_vector: Emit VPMAXSQ and VPMAXUQ for 64-bit vector max operations if AVX-512VL is available 2018-05-04 07:52:22 +01:00
Lioncash
69ac6dfca6 emit_x64_vector_floating_point: Deduplicate accurate NaN handling code
Allows the code to both be used from the 32 bit and 64 bit operations without duplicating code.
2018-05-03 23:22:50 +01:00
Lioncash
4ca546ce4d emit_x64_vector: Emit VPABSQ in EmitVectorAbs() for the 64-bit case if AVX-512VL is available 2018-05-03 23:22:18 +01:00
Lioncash
c9a6d6264e emit_x64_vector: Use VPSRAQ in EmitVectorArithmeticShiftRight64() if AVX-512VL is available 2018-05-03 16:13:11 +01:00
Lioncash
7a066fb011 disassembler_arm: Remove rotation helper function in favor of Common::RotateRight
Mildly reduces the amount of duplicated behavior
2018-05-02 17:14:13 +01:00
Lioncash
75d0b1ebd8 emit_x64_vector: Vectorize fallback path of EmitVectorMaxS32() 2018-05-02 17:14:07 +01:00
Lioncash
7f3cfff647 emit_x64_vector: Vectorize fallback path of EmitVectorMaxS8() 2018-05-02 17:14:07 +01:00
Lioncash
9607376f2f emit_x64_vector: Vectorize fallback path in EmitVectorMinU32() 2018-05-02 17:13:41 +01:00
Lioncash
1162be609d emit_x64_vector: Vectorize fallback path in EmitVectorMinU16() 2018-05-02 17:13:41 +01:00
Lioncash
7cab5c2e03 emit_x64_vector: Vectorize fallback path in EmitVectorMinS32() 2018-05-02 17:13:41 +01:00
Lioncash
7fa0d2765a emit_x64_vector: Vectorize fallback path in EmitVectorMinS8() 2018-05-02 17:13:41 +01:00
Lioncash
73477f04dd emit_x64_vector: Remove unnecessary if constexpr expression in LogicalVShift
This can simply be merged with the previous one.
2018-05-01 19:31:48 +01:00
Lioncash
f90a476546 emit_x64_vector: Avoid left shift of negative value in LogicalVShift
Now that we handle the signed variants, we also have to be careful about left shifts with negative values,
as this is considered undefined behavior.
2018-05-01 19:31:48 +01:00
Lioncash
e08c1bdae1 a64_jitstate: Zero SP and PC on construction of A64JitState
Given we zero out/reset everything else in the struct, do the same for these members to keep initialization consistent
2018-05-01 19:31:05 +01:00
Lioncash
e33ba25d8a backend_x64/callback: Default virtual destructor in the cpp file
Prevents the vtable being generated in each translation unit that includes the header (and silences -Wweak-vtables warnings)
2018-05-01 19:30:56 +01:00
Lioncash
83e20fc690 a32_interface/a64_interface: Change reinterpret_casts to static_casts in GetCurrentBlock thunks
It's well-defined to static_cast a void* to its proper type.
2018-05-01 19:30:25 +01:00
Lioncash
8aa9a47a6a A64: Implement SSHL (scalar) 2018-04-30 22:41:17 +01:00
Lioncash
8818d76212 A64: Implement SSHL (vector) 2018-04-30 22:41:17 +01:00
Lioncash
3e3ce37eb8 backend_x64/ir: Amend generic LogicalVShift() template to also handle signed variants
Also adds IR opcodes to dispatch said variants
2018-04-30 22:41:17 +01:00
Lioncash
4cb09c827d emit_x64_vector_floating_point: Use arrays for retrieving size instead of hardcoding the size
Similar changes were done in emit_x64_vector, but these were missed.
2018-04-30 22:40:25 +01:00
Lioncash
5e20e5a44a emit_x64_vector: Vectorize fallback path in EmitVectorMaxU16() 2018-04-28 19:19:06 +01:00
Lioncash
fea1e6ca1f A64: Implement CMTST's scalar variant 2018-04-28 19:17:38 +01:00
Lioncash
f8a96dbe5f emit_x64_vector: Vectorize non-SSE4.1 fallback path for VectorMultiply32() 2018-04-28 19:17:18 +01:00
Lioncash
43a3873dd2 emit_x64_vector: Use VBPROADCAST where applicable and available
Uses the instruction that does what it says in its name if available. Allows avoiding the use
of a scratch register in EmitVectorBroadcast8() and EmitVectorBroadcastLower8()'s SSSE3 path.
2018-04-26 22:28:09 +01:00
Lioncash
2a35b2a46a A64: Implement UZP1 and UZP2 2018-04-26 08:49:51 +01:00
Lioncash
9c2550ac72 ir: Add opcodes for performing vector deinterleaving 2018-04-26 08:49:51 +01:00
Lioncash
4765503fc6 A64: Implement FNEG (half-precision) 2018-04-26 08:49:03 +01:00
MerryMage
a00a605a4b README: Add usage example 2018-04-25 22:25:39 +01:00
Lioncash
96be76296e A64: Implement USHL (scalar) 2018-04-24 08:15:00 +01:00
Lioncash
8261911bd8 A64: Implement FNEG (vector) 2018-04-24 08:14:31 +01:00
Lioncash
633e8e3ecd A64: Implement RSUBHN/RSUBHN2 2018-04-23 21:08:43 +01:00
Lioncash
4dec013b09 A64: Implement RADDHN/RADDHN2 2018-04-23 21:08:43 +01:00
Lioncash
7fb04ccb36 A64: Implement XAR 2018-04-23 16:05:40 +01:00
Lioncash
db29d68a2d simd_two_register_misc: Factor out common comparison code
Gets rid of a tiny bit of duplicated code.
2018-04-23 16:04:58 +01:00
Lioncash
1692e26c2e A64: Implement CMLE (zero)'s vector variant 2018-04-23 16:04:58 +01:00
Lioncash
21936a82aa A64: Implement CMTST (vector) 2018-04-23 16:04:40 +01:00
Lioncash
4f27764191 A64: Implement ADDHN{2} and SUBHN{2} 2018-04-21 08:58:16 +01:00
Lioncash
1791114ab1 translate: zero extend result in Vpart when storing to lower part of vector 2018-04-21 08:58:16 +01:00
Lioncash
e96bfd1133 emit_x64_vector: Emit PMAXUD in EmitVectorMaxU32 on SSE4.1-capable CPUs 2018-04-20 23:34:32 +01:00
Lioncash
f85e2681fc emit_x64_vector: Emit PMINUD in EmitVectorMinU32 on SSE4.1-capable CPUs 2018-04-20 23:34:32 +01:00
Lioncash
2fb3ddd2cd emit_x64_vector: Emit PMINSD in EmitVectorMinS32 on SSE4.1-capable CPUs
Provides a better alternative to a fallback operation.
2018-04-20 23:34:32 +01:00
Lioncash
be48d44132 emit_x64_vector: Get rid of some magic numbers in loop bounds 2018-04-20 18:54:29 +01:00
Lioncash
a3c8ab61ea emit_x64_vector: Generify variable shift functions 2018-04-20 18:54:14 +01:00
Lioncash
f6e624e9ea A64: Implement CMLE (zero)'s scalar variant 2018-04-20 17:31:07 +01:00
Lioncash
41a3e87c15 A64: Implement CMLT (zero)'s scalar single/double-precision variant 2018-04-20 15:48:50 +01:00
Lioncash
51912ca6ab A64: Implement SHA512H2 2018-04-20 07:29:26 +01:00
Lioncash
4655f78ec2 A64: Implement SHA512H 2018-04-20 07:29:26 +01:00
Lioncash
3a52275611 A64: Handle S32->F32 case for SCVTF (vector) 2018-04-19 21:09:42 +01:00
Lioncash
230e954e5c IR: Add opcode for packed word->f32 conversions 2018-04-19 21:09:42 +01:00
Lioncash
f24cfba5c2 A64: Implement SHA512SU1 2018-04-19 19:51:31 +01:00
Lioncash
e3412d9779 A64: Implement SHA512SU0 2018-04-19 19:51:31 +01:00
Lioncash
cc76802990 A64: Implement SHA256H and SHA256H2 2018-04-19 19:50:17 +01:00
MerryMage
b5585baefb A64: Implement SCVTF (vector, integer), scalar varaint 2018-04-19 19:48:45 +01:00
MerryMage
badc7ac467 impl: Reorganize scalar two-register misc instructions 2018-04-19 19:48:45 +01:00
Lioncash
d53decf9e1 A64: Implement SHA256SU1 2018-04-19 08:40:55 +01:00
Lioncash
62be988507 simd_two_register_misc: Add missing zeroing of the vector for CMGT and CMLT 2018-04-19 08:39:56 +01:00
Lioncash
cd5fee6746 A64: Implement CMGE (zero)'s vector variant 2018-04-19 08:39:56 +01:00
Lioncash
da99e1fdaa A64: Implement MLS (by element) 2018-04-19 08:39:25 +01:00
Lioncash
8920238d59 A64: Implement MUL (by element) 2018-04-19 08:39:25 +01:00
MerryMage
68d6a1276b A64: Implement MLA (by element) 2018-04-19 00:04:52 +01:00
Lioncash
7340c36ae0 A64: Implement ABS (scalar) 2018-04-19 00:03:08 +01:00
Lioncash
c196c73e17 A64: Implement SHA256SU0 2018-04-19 00:00:39 +01:00
Lioncash
21790dcf98 CMake: Make FindUnicorn introduce a unicorn target
Makes the find module do all the work of properly setting up the target instead of needing to do it in the main CMakeLists file.
2018-04-18 23:59:54 +01:00
Lioncash
cb3b885025 A64: Implement SHA1M 2018-04-16 07:47:22 +01:00
Lioncash
4381ded969 A64: Implement SHA1P 2018-04-16 07:47:22 +01:00
Lioncash
dc5c2508a5 A64: Implement scalar variants of CMEQ, CMGT, and CMGE zero comparison instructions
These can trivially use the ScalarCompare helper function.
2018-04-15 13:38:42 +01:00
Lioncash
3a71801f10 A64: Implement scalar variant of NEG 2018-04-15 13:37:07 +01:00
Lioncash
f8e387f13f simd: Relocate REV16, REV32 and REV64 vector variants to the proper file
These aren't scalar instruction variants.
2018-04-15 13:37:07 +01:00
Lioncash
e23f6b666e A64: Implement CMEQ (register, scalar) 2018-04-15 11:31:20 +01:00
Lioncash
5f879af788 A64: Implement CMHS (register, scalar) 2018-04-15 11:31:20 +01:00
Lioncash
41e4b3e286 A64: Implement CMHI (register, scalar) 2018-04-15 11:31:20 +01:00
Lioncash
03f6247239 A64: Implement CMGE (register, scalar) 2018-04-15 11:31:20 +01:00
Lioncash
62ddc0631e A64: Implement CMGT (register, scalar) 2018-04-15 11:31:20 +01:00
Lioncash
cd1f7894b3 A64: Implement SHA1C 2018-04-15 10:32:03 +01:00
Lioncash
5315e63a2e A64: Implement SLI (scalar) 2018-04-15 08:56:09 +01:00
Lioncash
37051e9cb6 A64: Implement SRI (scalar) 2018-04-15 08:56:09 +01:00
Lioncash
1336e1a4ec unicorn: Be explicit about casting away const to const-incorrect APIs
Uses C++ casts which silence relevant warnings in Xcode 9.3

Also migrates relevant Read function equivalents over for consistency.
2018-04-15 08:54:36 +01:00
Lioncash
f9fbeb40bc general: Remove unused lambda captures
Resolves warnings that occur in Xcode 9.3
2018-04-15 08:53:23 +01:00
Lioncash
ea0435eee6 A64: Implement SHA1SU1 2018-04-14 08:06:15 +01:00
Lioncash
83e20f24f7 A64: Implement SHA1SU0 2018-04-14 08:06:15 +01:00
Lioncash
a48ff2b9e2 A64: Implement TRN2 2018-04-14 08:01:52 +01:00
Lioncash
9442cc8afa A64: Implement TRN1 2018-04-14 08:01:52 +01:00
Lioncash
d9ff5b1a9a A64: Implement SSRA (scalar) 2018-04-13 16:05:18 +01:00
Lioncash
fb5d5f8881 A64: Implement SSHR (scalar) 2018-04-13 16:05:18 +01:00
Lioncash
f0ecc27f2f A64: Implement USRA (scalar) 2018-04-13 16:05:18 +01:00
Lioncash
1e71835cb1 A64: Implement USHR (scalar) 2018-04-13 16:05:18 +01:00
Lioncash
746969bbe6 A64: Implement SHL (scalar) 2018-04-13 16:05:18 +01:00
Lioncash
a90cddaa05 A64: Implement SM3PARTW1 2018-04-13 15:22:10 +01:00
Lioncash
7570ea1a33 simd_sha512: Simplify RAX1
Now that the vector rotation helpers are in, replace the explicit
shifting with the relevant helper function that does the same thing.

Simply tidies up code; no behavioral changes are made.
2018-04-13 06:31:09 +01:00
Lioncash
c7c2fa2b66 A64: Implement SM3PARTW2 2018-04-12 09:21:51 +01:00
Lioncash
987ca9566b ir: Add helper functions for vector rotation 2018-04-12 09:21:51 +01:00
Lioncash
066cf3e7a7 A64: Implement SM3TT2B 2018-04-10 22:22:56 +01:00
Lioncash
bb7c0ab1ba A64: Implement SM3TT2A 2018-04-10 22:22:56 +01:00
Lioncash
3f81c90013 A64: Implement SM3TT1B 2018-04-10 18:30:33 +01:00
Lioncash
3e7483e1db A64: Implement SM3TT1A 2018-04-10 16:56:17 +01:00
Lioncash
8e739a73dc simd_shift_by_immediate: Merge signed/unsigned helper functions
Gets rid of a little more code duplication.
2018-04-10 16:43:59 +01:00
Lioncash
5f8f4d106a A64: Implement SM3SS1 2018-04-08 11:02:54 +01:00
Lioncash
c9c6ae101e A64: Implement SRI (vector) 2018-04-08 11:01:08 +01:00
Lioncash
4b9bdb2270 A64: Implement SLI (vector) 2018-04-08 11:01:08 +01:00
Lioncash
4e8fd68308 A64: Implement SRSRA (vector) 2018-04-08 10:55:27 +01:00
Lioncash
b3834adc2e A64: Implement SRSHR (vector) 2018-04-08 10:55:27 +01:00
MerryMage
6febae5f8e imm: Add additional bit position checks to Imm::Bits 2018-04-08 10:42:23 +01:00
MerryMage
5bc164adb9 math_util: rvalue references for std::forward 2018-04-08 10:37:11 +01:00
Lioncash
3fdaf77c7a A64: Implement SSUBL/SSUBL2 2018-04-07 15:20:58 +01:00
Lioncash
c669f091e6 A64: Implement SADDL/SADDL2 2018-04-07 15:20:58 +01:00
Lioncash
c144cb39c9 A64: Implement USUBL/USUBL2 2018-04-07 15:20:58 +01:00
Lioncash
14bc8bce7f A64: Implement UADDL/UADDL2 2018-04-07 15:20:58 +01:00
Lioncash
a000cb6e36 simd_shift_by_immediate: Factor out common code in shift instructions
Gets rid of partial duplication of the same code for instructions that only have a small behavior difference to them.

e.g. The only difference between SSHR and SSRA is that SSRA adds an accumulator before storing the result.
2018-04-07 15:20:28 +01:00
Lioncash
436eddcfa1 A64: Implement URSRA (vector) 2018-04-04 14:17:43 +01:00
Lioncash
c72c8bff0d A64: Implement URSHR (vector) 2018-04-04 14:17:43 +01:00
Lioncash
4f705d840f A64: Implement RSHRN/RSHRN2 2018-04-04 11:43:02 +01:00
Lioncash
6e3e03a48b A64: Implement SHRN/SHRN2 2018-04-04 11:43:02 +01:00
Lioncash
523c0fd0e0 A64/translate: Amend I() to also handle u8 and u16 immediates
This is necessary for instructions like SRSHR, and other related instructions.
2018-04-04 11:43:02 +01:00
MerryMage
f0ba929fc3 fuzz_with_unicorn: Correct GenRandomInst
UnallocatedEncoding is now handled in ShouldTestInst
2018-04-04 11:15:56 +01:00
MerryMage
3c3767e073 A64: Implement FMOV (vector, immediate) and mark other SIMD modified immediate instructions as unallocated 2018-04-04 10:36:27 +01:00
MerryMage
92e416a9b8 A64: Implement ZIP2 2018-04-04 10:23:04 +01:00
MerryMage
9891fb3b2c travis: Enable DYNARMIC_USE_LLVM
Provides disassembly, which is useful for debugging failing tests
on CI.
2018-04-04 09:17:38 +01:00
MerryMage
6968880eb6 decoder/a64: Tweak ordering algorithm
Ensuring only instruction families are sorted with each other in
the fashion previously devised does not admit a total ordering.
2018-04-04 09:14:41 +01:00
MerryMage
3a5b6ba709 ir_emitter: Remove overloads
Having overloads made explicit casting necesssary for these functions when
using types like UAny.
2018-04-03 23:13:52 +01:00
Lioncash
61fd0d4fdb A64: Implement RBIT (vector) 2018-04-03 21:18:03 +01:00
Lioncash
f921005a70 ir: Add opcode for reversing bits in a vector 2018-04-03 21:18:03 +01:00
Lioncash
4fc8daa103 A64/translate: Amend instruction prototypes erroneously marked as taking Reg
Makes the prototypes consistent
2018-04-03 18:05:01 +01:00
Lioncash
b4e944cd51 A64: Implement RAX1 2018-04-03 14:28:41 +01:00
Lioncash
d56bed53e6 a64_get_set_elimination_pass: Make TrackingType enum an enum class
Prevents placing single letter enum members into the surrounding scope.
2018-04-03 07:49:33 +01:00
Lioncash
748f624fe8 A64: Implement ABS (vector) 2018-04-03 07:49:08 +01:00
Lioncash
032b09cbdf ir: Add opcodes for performing vector absolute values 2018-04-03 07:49:08 +01:00
Lioncash
8cb52b48e6 A64: Implement USUBW/USUBW2 2018-04-03 07:48:26 +01:00
Lioncash
958e30a87a A64: Implement SSUBW/SSUBW2 2018-04-03 07:48:03 +01:00
Lioncash
8b3ff327bb A64: Implement SADDW/SADDW2 2018-04-03 07:48:03 +01:00
MerryMage
cfbe7cfd83 A64: Implement EXT 2018-04-02 22:10:28 +01:00
MerryMage
14d3d72aac IR: Implement VectorExtract, VectorExtractLower IR instructions 2018-04-02 21:52:46 +01:00
MerryMage
9d471a6899 A64: Implement UADDW 2018-04-02 21:51:40 +01:00
MerryMage
c56b6d0981 A64: Implement FMUL (vector) 2018-04-02 21:02:57 +01:00
Lioncash
19068dea1f A64: Implement UABA
Now that we have unsigned absolute difference capabilities, we can just use this to
append onto the result via a vector add.
2018-04-02 19:08:20 +01:00
Lioncash
62d49b32c2 A64: Implement UABD 2018-04-02 19:08:20 +01:00
Lioncash
734447ef3d ir: Add opcodes for performing vector unsigned absolute differences 2018-04-02 19:08:20 +01:00
Lioncash
5baa22b26b ir_emitter: Make immediate member functions const qualified
These don't modify class state
2018-04-02 19:07:26 +01:00
Lioncash
1e8fe95cc4 IR: Add opcodes for interleaving upper-order bytes/halfwords/words/doublewords
I should have added this when I introduced the functions for interleaving
low-order equivalents for consistency in the interface.
2018-03-31 11:01:38 +01:00
Lioncash
3970a8856d A64: Implement SHA1H
This is a fairly trivial instruction it's essentially:

result = ROL(data, 30);
2018-03-31 10:59:49 +01:00
Lioncash
cad9d31b83 emit_x64_data_processing: Deduplicate some code in zero-extension functions
EmitZeroExtendByteToLong() can be implemented in terms of EmitZeroExtendByteToWord() and
EmitZeroExtendHalfToLong() can be implemented in terms of EmitZeroExtendHalfToWord().
2018-03-29 20:59:50 +01:00
Lioncash
a94f321f69 A64: NOP immediate variant of PRFM
Makes behavior identical to the literal variant of PRFM. Given this is simply a hint instruction,
this is valid behavior. The upside is that we don't fall back to Unicorn unnecessarily whenever
the instruction is encountered.
2018-03-29 20:59:43 +01:00
MerryMage
9cc12d80b9 abi: Missing includes' 2018-03-29 12:46:29 +01:00
MerryMage
ac35ad5838 emit_x64_floating_point: Near jump instead of short jump in FPMinNumberic{32,64} 2018-03-29 12:45:33 +01:00
Lioncash
6f03fddee5 A64: system: Use an enum class for MRS/MSR register encodings
Reduces the need to manually write out the register bit encodings repeatedly.
2018-03-29 12:44:37 +01:00
MerryMage
12a102046c emit_X64_floating_point: Near jmp to end instead of short jmp
Jump destination can be further than what can be reached in a short
jump under some FPCR options.
2018-03-27 08:21:21 +01:00
Lioncash
6278f83560 emit_x64_vector: Fix typo in VectorShuffleImpl
This is supposed to be pshufd, not pshufw (which only allows a 64-bit operand)
2018-03-23 19:51:09 +00:00
Lioncash
25a0204203 A64: Implement REV64 2018-03-23 17:34:59 +00:00
Lioncash
aa92e33194 bit_util: Do nothing in RotateRight if the rotation amount is zero
Without this sanitizing it's possible to perform a shift with a shift
amount that's the same size as the type being shifted. This actually
occurs when decoding ORR variants.

We could get fancier here and make this branchless, but we don't
really use RotateRight in any performance intensive areas.
2018-03-21 19:30:02 +00:00
Lioncash
e537985584 A64: Implement REV32 (vector) 2018-03-21 15:40:03 +00:00
Lioncash
f62a258945 ir: Add IR opcodes for emitting vector shuffles
This uses the ARM terminology for sizes (Halfword -> 2 bytes, Word -> 4 bytes)
as opposed to the x86 terminology of (Word -> 2 bytes, Double word -> 4 bytes)
2018-03-21 15:40:03 +00:00
Lioncash
36ac6ec102 emit_x64_vector_floating_point: Fix out of bounds array access in EmitVectorOperation64 2018-03-21 15:39:44 +00:00
Lioncash
20a59a9721 A64: Implement REV16 (vector) 2018-03-16 18:01:33 +00:00
Lioncash
b2f7bb0263 CMakeLists: Add fp_util, macro_util and math_util headers
Allows the headers to show up within IDEs
2018-03-13 23:21:20 +00:00
Lioncash
fd21b58c3d A64: Implement EOR3 and BCAX 2018-03-13 23:20:58 +00:00
Lioncash
a48c0bbf9c travis: Use yuzu's unicorn fork 2018-03-13 23:20:58 +00:00
Lioncash
59e62e089e externals: Update catch to v2.2.1
Keeps the testing library up to date
2018-03-12 18:03:45 +00:00
MerryMage
6b4c6b06a9 impl: Update PC when raising exception 2018-02-21 21:02:42 +00:00
MerryMage
7a1313aa24 A64: Implement FDIV (vector) 2018-02-21 15:03:36 +00:00
MerryMage
b2d781da3a system: Raise exception for YIELD, WFE, WFI, SEV, SEVL 2018-02-20 20:31:56 +00:00
MerryMage
b277bf5061 Correct FPSR and FPCR 2018-02-20 20:31:17 +00:00
MerryMage
7673933a9b A64: Implement USHL 2018-02-20 19:48:15 +00:00
MerryMage
8d0e558271 A64: Implement UCVTF (vector, integer), scalar variant 2018-02-20 19:11:35 +00:00
MerryMage
da9a4f8877 A64: Partially implement FCVTZU (scalar, fixed-point) and FCVTZS (scalar, fixed-point) 2018-02-20 18:45:28 +00:00
MerryMage
747968416f A64: Implement system register TPIDR_EL0 2018-02-20 17:56:20 +00:00
MerryMage
0fd75fd9cb A64: Implement system registers FPCR and FPSR 2018-02-20 17:38:29 +00:00
MerryMage
31e370cdf4 A64: Implement system register CNTPCT_EL0 2018-02-20 16:56:05 +00:00
MerryMage
9a88fd3340 A64: Implement system register CTR_EL0 2018-02-20 16:44:13 +00:00
MerryMage
1d16896d25 A64: Implement NEG (vector) 2018-02-20 15:41:07 +00:00
MerryMage
3184edf4a9 IR: Add IR instruction ZeroVector 2018-02-20 15:41:07 +00:00
MerryMage
31f8fbc5b8 emit_x64_floating_point: Add maybe_unused to preprocess parameter 2018-02-20 15:41:07 +00:00
MerryMage
567eb1a2f1 A64: Implement FMINNM (scalar) 2018-02-20 14:14:40 +00:00
MerryMage
c6d8fa1d36 A64: Implement FMAXNM (scalar) 2018-02-20 14:05:14 +00:00
MerryMage
616056d9a3 constant_pool: Add frame parameter 2018-02-20 14:04:48 +00:00
MerryMage
a3747cb01c A64: Implement ADDP (scalar) 2018-02-18 23:55:38 +00:00
MerryMage
5cd5d9f5f8 reg_alloc: Only exchange GPRs 2018-02-18 23:24:15 +00:00
MerryMage
dd0452a435 A64: Implement DUP (element), scalar variant 2018-02-18 18:58:01 +00:00
MerryMage
e5732ea66f emit_x64_floating_point: Correct FP{Max,Min}{32,64} implementations for -0/+0 2018-02-18 15:19:10 +00:00
MerryMage
40eb9c3253 A64: Implement FMAX (scalar), FMIN (scalar) 2018-02-18 13:49:23 +00:00
MerryMage
7cef39bdb4 fuzz_with_unicorn: QEMU's implementation of FCVT is incorrect 2018-02-18 13:47:41 +00:00
MerryMage
826dce212e travis: Switch unicorn repository 2018-02-18 13:21:29 +00:00
MerryMage
9605f28792 a64/config: Allow NaN emulation accuracy to be set 2018-02-18 13:18:22 +00:00
MerryMage
e9435bc191 a64_emit_x64: Add conf to A64EmitContext 2018-02-18 13:18:22 +00:00
MerryMage
30b596df19 fuzz_with_unicorn: Explicitly test floating point instructions 2018-02-18 13:18:22 +00:00
MerryMage
be292a819c A64: Implement FSQRT (scalar) 2018-02-18 13:18:22 +00:00
MerryMage
3c42d48a3f backend_x64: Accurately handle NaNs 2018-02-18 13:18:22 +00:00
MerryMage
4aefed05d5 fuzz_with_unicorn: Print AArch64 disassembly 2018-02-18 13:18:22 +00:00
MerryMage
e585e1d49e T32: Add initial decoder list 2018-02-14 19:29:19 +00:00
MerryMage
1598af4f12 simd_three_same: Add VectorZeroUpper to CMGE (vector) and CMHS (vector) 2018-02-13 19:01:47 +00:00
MerryMage
029ae11040 A64: Implement CMGT (zero), CMEQ (zero), CMLT (zero) 2018-02-13 19:01:21 +00:00
MerryMage
91483ab975 decoder/a64: Rearrange SIMD two-register misc decoders 2018-02-13 18:51:43 +00:00
MerryMage
9158534048 A64: Implement CMGE (register) 2018-02-13 18:29:54 +00:00
MerryMage
41e421bf0b A64: Implement CMHI, CMHS 2018-02-13 18:20:18 +00:00
MerryMage
324810cfad IR: Implement Vector{Less,Greater}{,Equal}{Signed,Unsigned} 2018-02-13 18:20:00 +00:00
MerryMage
89007194a7 A64: Implement SMAX, SMIN, UMAX, UMIN 2018-02-13 17:57:07 +00:00
MerryMage
2880eb3da1 IR: Implement Vector{Max,Min}{Signed,Unsigned} 2018-02-13 17:56:46 +00:00
MerryMage
7d8543b70e A64: Implement CMGT (register) 2018-02-13 15:47:52 +00:00
MerryMage
6d4f14e876 IR: Implement VectorGreaterSigned 2018-02-13 15:47:52 +00:00
MerryMage
9527d52c49 Exclusive fixups
* Incorrect size of exclusive_address
* Disable tests on exclusive memory instructions for now
2018-02-13 15:47:52 +00:00
MerryMage
182c776d7e a64_emit_x64: EmitExclusiveWrite: Make MSVC happy (narrowing conversion warning) 2018-02-13 13:39:14 +00:00
MerryMage
229ff47738 Merge branch 'feature/exclusive-mem' 2018-02-13 12:53:29 +00:00
MerryMage
43f27b3e15 A64: Implement STXP, STLXP, LDXP, LDAXP 2018-02-13 12:50:50 +00:00
MerryMage
11eb8c2bea A64: Implement CLREX 2018-02-13 12:31:16 +00:00
MerryMage
22285842af A64: Implement STXRB, STXRH, STXR, STLXRB, STLXRH, STLXR, LDXRB, LDXRH, LDXR, LDAXRB, LDAXRH, LDAXR 2018-02-13 12:30:58 +00:00
MerryMage
d7323d6799 fuzz_with_unicorn: Speed up tests by not initializing/tearing down constantly 2018-02-12 21:48:29 +00:00
MerryMage
eac0933738 Merge branch 'feature/direct-page-table-access' 2018-02-12 21:47:43 +00:00
MerryMage
49f1de3188 Direct Page Table Access: Handle address spaces less than the full 64-bit in size 2018-02-12 21:26:23 +00:00
MerryMage
406725e533 Implement direct page table access 2018-02-12 20:51:03 +00:00
MerryMage
adc2d5a3cc fuzz_with_unicorn: Fix read-past-end access via jit_iter 2018-02-12 20:51:03 +00:00
MerryMage
885e092f99 callbacks: Member functions should be const 2018-02-12 20:51:03 +00:00
MerryMage
9598bd45ef a64_emit_x64: Implement {Read,Write}Memory128 in terms of a function call 2018-02-12 18:26:08 +00:00
MerryMage
276326e0e8 abi: Add RAX to ABI_ALL_CALLER_SAVE 2018-02-12 18:17:39 +00:00
MerryMage
7a161ed35c A64: Partially implement MRS 2018-02-12 00:06:44 +00:00
MerryMage
b733479b5e A64: Implement DSB, DMB 2018-02-11 23:27:28 +00:00
MerryMage
1ba2642742 Implement DC instructions 2018-02-11 23:12:28 +00:00
Lioncash
e12fa19142 A64: Implement NOT (vector) 2018-02-11 20:14:03 +00:00
MerryMage
1b836b6deb IR: Implement FPMax, FPMin 2018-02-11 16:43:47 +00:00
MerryMage
94115d1775 A64: Implement FADD (vector), vector variant 2018-02-11 16:30:03 +00:00
MerryMage
24def19cd7 IR: Implement FPVectorAdd 2018-02-11 16:29:48 +00:00
MerryMage
9379d54a44 A64: Implement SSHLL, SSHLL2 2018-02-11 16:24:55 +00:00
MerryMage
a7e4202828 IR: Implement VectorSignExtend 2018-02-11 16:24:33 +00:00
MerryMage
01760f1a21 CMakeLists: Ignore warnings within xbyak 2018-02-11 14:57:35 +00:00
MerryMage
ae7d118f22 A64: Implement DUP (element), vector variant 2018-02-11 14:34:13 +00:00
MerryMage
b87814ce88 load_store_multiple_structures: Improve IR codegen for selem == 1 case 2018-02-11 12:48:49 +00:00
MerryMage
6113346a5b A64: Implement FSUB (vector) 2018-02-11 12:18:05 +00:00
MerryMage
8c6fce20d2 IR: Implement FPVectorSub 2018-02-11 12:17:53 +00:00
MerryMage
3fffeadf0d emit_x64_vector: EmitOneArgumentFallback 2018-02-11 11:59:43 +00:00
MerryMage
4df6c424df Forward declare IR::Opcode and IR::Type where possible 2018-02-11 11:52:44 +00:00
MerryMage
09632954d7 A64: Implement CNT 2018-02-11 11:52:44 +00:00
MerryMage
c2c9ea85a5 IR: Implement VectorPopulationCount 2018-02-11 11:52:44 +00:00
MerryMage
0996d4fd2e A64: Implement MLS (vector) 2018-02-11 11:04:46 +00:00
MerryMage
5319f6af95 A64: Implement MLA (vector) 2018-02-11 11:00:16 +00:00
MerryMage
17519df3e8 emit_x64_vector: Add SSE4.1 implementation for EmitVectorMultiply64 2018-02-11 10:47:22 +00:00
MerryMage
eac6a56a4b emit_x64_vector: More explicit lambda decay 2018-02-11 10:47:00 +00:00
MerryMage
727b1b0b51 A64: Implement MUL (vector) 2018-02-11 10:18:47 +00:00
MerryMage
80fce9c4b9 IR: Implement VectorMultiply 2018-02-11 10:18:29 +00:00
MerryMage
cb65a26da2 emit_x64_vector: Order alphabetically 2018-02-11 09:41:37 +00:00
MerryMage
2b968981a1 A64: Implement STR (register, SIMD&FP), LDR (register, SIMD&FP) 2018-02-11 01:06:26 +00:00
MerryMage
7681159811 decoder/a64: Don't rearrange unrelated decoders 2018-02-11 00:43:33 +00:00
MerryMage
56fe848e4e A64: Implement SUB (vector) 2018-02-10 23:58:33 +00:00
MerryMage
b429efa081 A64: Implement SIMD instruction SSRA, vector variant 2018-02-10 23:30:00 +00:00
MerryMage
0a96a437cb A64: Implement SIMD instruction SSHR, vector variant 2018-02-10 23:28:05 +00:00
MerryMage
a5299d0be5 IR: Implement VectorArithmeticShiftRight 2018-02-10 23:27:46 +00:00
MerryMage
8e8068cfaf impl: Improve Vpart setter 2018-02-10 17:05:52 +00:00
MerryMage
5ffa84f41d A64: Implement SIMD instructions XTN, XTN2 2018-02-10 17:01:33 +00:00
MerryMage
dc9785bdcd IR: Implement VectorNarrow 2018-02-10 17:01:33 +00:00
MerryMage
ebc594385c constant_pool: Allow for 128-bit constants 2018-02-10 16:36:00 +00:00
MerryMage
8e23683b63 emit_x64_vector: Add SSE4.1 implementations for VectorZeroExtend 2018-02-10 16:24:43 +00:00
MerryMage
d9f803924e IR: Implement VectorSub 2018-02-10 11:25:50 +00:00
MerryMage
c01bbbd09d A64: Implement SIMD instruction USRA, vector variant 2018-02-10 11:12:54 +00:00
MerryMage
9e80f94b5f A64: Implement SIMD instruction USHR, vector variant 2018-02-10 11:05:58 +00:00
MerryMage
e6a0a4d8ce IR: Implement VectorLogicalShiftRight 2018-02-10 11:05:22 +00:00
MerryMage
60ddaa8f38 A64: Implement SIMD instructions USHLL, USHLL2 2018-02-10 10:35:14 +00:00
MerryMage
670b47149e IR: Implement VectorZeroExtend 2018-02-10 10:35:14 +00:00
MerryMage
7ec12cbade IR: Vector instructions now take esize argument in emitter 2018-02-10 10:18:10 +00:00
MerryMage
b219105b75 A64: Implement SIMD instruction SHL 2018-02-10 09:49:55 +00:00
MerryMage
570911e693 IR: Implement VectorLogicalShiftLeft{8,16,32,64} 2018-02-10 09:31:54 +00:00
MerryMage
e03a9fed98 opcodes: Sort vector IR opcodes alphabetically 2018-02-10 09:15:01 +00:00
MerryMage
406c071008 block_of_code: Increase constant pool size 2018-02-09 16:04:56 +00:00
MerryMage
9be412bbc2 devirtualize: MinGW uses Intanium MFP ABI 2018-02-09 16:04:48 +00:00
MerryMage
7a0fdf01bb callback: Properly handle calls with return pointers and simplify interface 2018-02-09 16:02:57 +00:00
FernandoS27
dee211c4df Implemented BSL, BIC, BIT and BIF vector instructions 2018-02-09 13:28:16 +00:00
MerryMage
15da38d3aa devirtualize: Handle Windows ABI 2018-02-09 11:19:40 +00:00
MerryMage
41ae12263d travis: Switch to yuzu-emu's unicorn repository 2018-02-08 19:48:04 +00:00
MerryMage
83a762eee7 fuzz_arm: Use SCOPE_FAIL 2018-02-08 02:14:42 +00:00
MerryMage
b0991ee46f A32/decoder/arm: bug: Correct bitstring for SRS 2018-02-08 02:05:49 +00:00
MerryMage
43035fd064 devirtualize: Devirtualize Itanium ABI MFPs at runtime 2018-02-07 12:25:45 +00:00
MerryMage
36ec1d09cf cast_util: Add BitCast and BitCastPointee 2018-02-07 12:25:45 +00:00
Lioncash
1ee5b2e352 A64: Move SDIV and UDIV out of data_processing_multiply.cpp 2018-02-07 12:07:09 +00:00
Lioncash
25e7c94995 A64: Implement ZIP1 2018-02-07 12:06:49 +00:00
FernandoS27
c882e6819d Implemented UMULH and SMULH instructions 2018-02-06 23:59:24 +00:00
MerryMage
32be42c68e A64: Implement MOVI, MVNI, ORR (vector, immediate), BIC (vector, immediate)
There wasn't a clean way to seperate these instructions out.
2018-02-06 23:29:18 +00:00
MerryMage
b6775f1282 impl: Add AdvSIMDExpandImm 2018-02-06 23:04:23 +00:00
MerryMage
023c2c9818 A64: Implement SUB (vector), scalar variant 2018-02-06 22:12:39 +00:00
MerryMage
b544b8f4b1 A64: Implement ADD (vector), scalar variant 2018-02-06 22:09:39 +00:00
MerryMage
63d3a1cc1c A64: Reorganize decoder tables (some vector entries were grouped with scalar entries) 2018-02-06 18:30:36 +00:00
MerryMage
59a84ed966 A64: Implement BIC (vector, register) 2018-02-06 17:57:50 +00:00
MerryMage
41bbb56cff docs: Update documentation (2018-02-05) 2018-02-05 22:36:03 +00:00
MerryMage
8530f52729 A64: Implement FMOV (general) 2018-02-05 21:44:20 +00:00
MerryMage
ef9057555b translate/impl: Add Vpart 2018-02-05 21:43:58 +00:00
MerryMage
37b4840c6f A64: Implement STLLRB, STLLRH, STLLR, LDLARB, LDLARH, LDLAR 2018-02-05 15:41:41 +00:00
MerryMage
a785d4fa66 A64: Implement FCCMPE 2018-02-05 12:26:19 +00:00
MerryMage
d2a2562a25 A64: Implement FCCMP 2018-02-05 12:26:19 +00:00
MerryMage
24178131a6 a64_jitstate: Remove unnecessary FPSCR_nzcv member 2018-02-05 12:26:19 +00:00
MerryMage
37a9472f81 IR: FPCompare{32,64} now return NZCV flags instead of implicitly setting them 2018-02-05 12:26:19 +00:00
Lioncash
d86b8fc40d A64: Implement FMOV (register) 2018-02-05 09:34:47 +00:00
MerryMage
97a742a7c0 A64: Implement STLRB, STLRH, STLR, LDARB, LDARH, LDAR 2018-02-05 01:12:19 +00:00
Lioncash
e619902ee5 A64: Implement CCMP (immediate) 2018-02-05 00:45:39 +00:00
Lioncash
d91989a014 A64: Implement CCMN (immediate) 2018-02-05 00:45:39 +00:00
Lioncash
d5e58ac771 A64: Implement CCMP (register) 2018-02-05 00:45:39 +00:00
Lioncash
cd3113c208 microinstruction: Add ConditionalSelectNZCV opcode to ReadsFromCPSR()'s switch statement 2018-02-05 00:45:11 +00:00
MerryMage
10594c7adb A64: Implement CCMN (register) 2018-02-04 23:11:07 +00:00
MerryMage
ee8726a8ba IR: Add ConditionalSelectNZCV instruction 2018-02-04 23:08:43 +00:00
Lioncash
1621741fc6 inst_gen: Make invalid_instructions a static inline variable 2018-02-04 19:44:29 +00:00
Lioncash
73ad0b0b00 fuzz_with_unicorn: Move instruction generator vector into GenRandomInst
Keeps scope localized and prevents potential static initialization issues.
2018-02-04 19:44:29 +00:00
MerryMage
c3d2edf8ee A64: Implement FNEG 2018-02-04 13:44:33 +00:00
MerryMage
ad5fe6dc43 A64: Implement FABS 2018-02-04 13:43:47 +00:00
MerryMage
107bd14a43 A64: Implement FCSEL 2018-02-04 13:40:37 +00:00
MerryMage
9db02bb4db A64: Implement SCVTF (scalar, integer), UCVTF (scalar, integer) 2018-02-04 13:21:31 +00:00
MerryMage
f87ecad5a4 A64: Implement FCVTZS (scalar, integer), FCVTZU (scalar, integer) 2018-02-04 13:09:57 +00:00
MerryMage
cc7b315268 backend_x64: Simplify FPDoubleToU32 and FPSingleToU32
They're inaccurate in terms of FPSR at the moment anyway.
2018-02-04 13:07:19 +00:00
MerryMage
e5ce22aabc A64: Implement STR{,B,H} (register), LDR{,B,H,SB,SH,SW} (register), PFRM (register) 2018-02-04 12:49:40 +00:00
Lioncash
dc9317f714 Common: Put AES code within its own nested namespace
Prevents the functions from potentially clashing with other stuff in Common in the future
2018-02-03 23:11:46 +00:00
Lioncash
ccf9493653 A64: Implement AESD 2018-02-03 23:11:46 +00:00
Lioncash
33bc59c55a A64: Implement AESE 2018-02-03 23:11:46 +00:00
MerryMage
db6999fc38 backend_x64: Use a reference to BlockOfCode instead of a pointer 2018-02-03 14:28:57 +00:00
MerryMage
a7209dc2f7 IR: Add IR instruction NZCVFromPackedFlags
This instruction expects NZCV to be in the high bits.
i.e.: The positions they were in PSTATE.
2018-02-03 13:41:36 +00:00
MerryMage
2262b08a04 A64: Implement INS (general) 2018-02-03 13:07:00 +00:00
MerryMage
3c140141db A64: Implement INS (element) 2018-02-03 13:03:50 +00:00
MerryMage
af5fb0a1a0 A64: Implement SMOV 2018-02-03 12:58:19 +00:00
MerryMage
818b9a4673 A64: Implement UMOV 2018-02-03 12:55:53 +00:00
MerryMage
9ea219e010 basic_block: Fix bogus GCC maybe-uninitialized warning 2018-02-03 03:04:44 +00:00
MerryMage
64e37de179 A64: Implement FCVT 2018-02-03 01:23:11 +00:00
MerryMage
f1d2cdde34 fuzz_with_unicorn: Skip instructions that need to be interpreted 2018-02-03 01:22:40 +00:00
MerryMage
2fd70e56ce A64: Implement FMOV (scalar, immediate) 2018-02-03 00:52:48 +00:00
MerryMage
567c1b57fc A64: Implement STUR (SIMD&FP), LDUR (SIMD&FP) 2018-02-02 22:39:24 +00:00
MerryMage
c42ca435ba A64: Implement FCMP, FCMPE 2018-02-02 22:25:51 +00:00
MerryMage
0131a87c43 a64_jitstate: A64 does not have a seperate FPSCR.NZCV 2018-02-02 22:25:18 +00:00
MerryMage
4728257d4e A64: Implement FMUL (scalar), FDIV (scalar), FADD (scalar), FSUB (scalar), FNMUL (scalar) 2018-02-02 22:04:09 +00:00
MerryMage
fcabd95ad0 IR: Merge U32 and U64 variants of FP instructions 2018-02-02 21:55:23 +00:00
MerryMage
6d9adb668e A64: Implement {ST,LD}{1,2,3,4} (multiple structures) 2018-02-02 21:10:30 +00:00
MerryMage
bfeb9ff617 emit_x64_vector: bug: VectorGetElement8 returning incorrect values for non-SSE4.1
This bug wasn't discovered earlier because we previously only used index == 0.
2018-02-02 21:07:00 +00:00
MerryMage
cc40b83ed0 IR: Implement VectorSetElement{8,16,32,64} 2018-02-02 21:00:12 +00:00
Lioncash
b608979be9 A64: Implement AESIMC and AESMC 2018-02-02 17:35:16 +00:00
Lioncash
58598e2e15 iterator_util: Make Reverse constexpr
C++17 makes non-member rbegin(), rend(), crbegin(), and crend() constexpr, allowing this to also be constexpr.
2018-01-31 18:09:15 +00:00
Lioncash
c9da41884c Common: Relocate common bits of CRC32
Allows the algorithm to be used in any other potential backend.
2018-01-30 07:57:29 +00:00
Lioncash
7fb386aa1c A64: Implement CRC32 2018-01-29 17:06:17 +00:00
MerryMage
64157d34cf travis: Bump MACOSX_DEPLOYMENT_TARGET 2018-01-29 17:05:50 +00:00
MerryMage
65078d5b18 fuzz_with_unicorn: Print information on test failure 2018-01-28 22:33:34 +00:00
MerryMage
4cc2cecaff scope_exit: Add SCOPE_SUCCESS and SCOPE_EXIT 2018-01-28 18:03:58 +00:00
MerryMage
607b9c8c62 A64: Add Disassemble method 2018-01-28 18:03:57 +00:00
MerryMage
e0ab098473 A32: data_processing: Remove !S assertions 2018-01-28 12:59:52 +00:00
MerryMage
b96014b3b2 A32: Implement BKPT 2018-01-28 12:59:52 +00:00
MerryMage
14910e53d3 A32: Add ExceptionRaised IR instruction and use it 2018-01-28 12:59:52 +00:00
Lioncash
0216cbd2a5 A64: Implement CRC32C 2018-01-28 12:20:56 +00:00
MerryMage
2e14326fd5 assert: Use fmt in ASSERT_MSG 2018-01-28 00:00:58 +00:00
Lioncash
7a96daa715 externals: Update catch to v2.1.1
Brings in a few minor improvements like proper stringification of static arrays.
2018-01-27 22:54:22 +00:00
Lioncash
7f31a9b5ab fuzz_with_unicorn: Move data outside loop
Given we know we're only ever going to use one instruction, we can just presize the vector and reassign to it
instead of potentially reallocating the same memory 100000 times
2018-01-27 22:54:01 +00:00
Lioncash
763a4783f9 fuzz_with_unicorn: Dehardcode some constants 2018-01-27 22:54:01 +00:00
MerryMage
1f06ca80d4 a64_emit_x64: Perform RSB predictions 2018-01-27 22:48:08 +00:00
MerryMage
3f6889f700 A32: Change UserCallbacks to be similar to A64's interface 2018-01-27 22:45:48 +00:00
Lioncash
4798a40908 reg_alloc: std::move RegAlloc's function argument 2018-01-27 02:52:59 +00:00
Lioncash
c40e7acc8e General: Add missing override specifiers 2018-01-27 02:46:04 +00:00
MerryMage
e111309aba EmitZeroExtendLongToQuad: Do not rely on register allocator to zero extend 64->128 2018-01-27 02:00:49 +00:00
MerryMage
a1018a4eea a64_get_set_elimination_pass: Simplify algorithm 2018-01-27 02:00:49 +00:00
MerryMage
ac1f4d3d5d a64_emit_x64: bug: x64 sign-extends 32-bit immediates 2018-01-27 00:38:43 +00:00
MerryMage
9232be5553 ir_opt: Add A64 Get/Set Elimination Pass 2018-01-27 00:38:43 +00:00
MerryMage
39b7625e9d ir_emitter: Allow the insertion point for new instructions to be set 2018-01-27 00:38:43 +00:00
MerryMage
68c5399607 {a32,a64}_interface: Predict entrypoint 2018-01-27 00:38:42 +00:00
Lioncash
dbddb4858a A64: Implement EXTR 2018-01-26 22:07:48 +00:00
MerryMage
43330ec3ba Squashed 'externals/xbyak/' changes from d512551e..2794cde7
2794cde7 add xword, yword, etc. in Xbyak::util
fb9c04e4 fix document for vfpclassps
a51be78b fix test dependency
04fdfb1e update version
e6354f8b add vgf2p8mulb
09a12642 add gf2p8affineqb
d171ba0e add gf2p8affineinvqb
457f4fd0 add vpshufbitqmb
5af0ba39 add vpexpand{b,w}
e450f965 vpopcnt{d,q} supports ptr_b
48499eb1 add vpdpbusd(s), vpdpwssd(s)
9c745109 add vpdpbusd, vpdpbusds
0e1a11b4 add vpopcnt{b,w,d,q}
9acfc132 add vpshrd(v){w,d,q}
ac8de850 add vpshld(v){w,d,q}
f181c259 add vcompressb, vcompressw
5a402477 vpclmulqdq supports AVX-512
9e16b40b vaes* supports AVX-512
7fde08e0 add flags for intel's manual 319433-030.pdf
c5da3778 add test of v4fmaddps, vp4dpwssd, etc.
e4fc9d8a fix mpx encoding
d0b2fb62 add bnd(0xf2) prefix for MPX
f12b5678 use db for array
cd74ab44 remove bat file

git-subtree-dir: externals/xbyak
git-subtree-split: 2794cde79eb71e86490061cac9622ad0067b8d15
2018-01-26 18:39:45 +00:00
MerryMage
0dc584a62d externals: Update xbyak to v5.601
Merge commit '43330ec3ba6dae3829675874258bdd717d0f3f19'
2018-01-26 18:39:45 +00:00
MerryMage
bda9148e71 A64: Implement LDP (SIMD&FP) and STP (SIMD&FP) 2018-01-26 18:39:19 +00:00
MerryMage
e789d8ff53 a64_jitstate: Have 128-bit wide spills 2018-01-26 18:38:31 +00:00
MerryMage
0c1c82a937 IR: Implement IR instructions A64{Get,Set}S 2018-01-26 18:38:30 +00:00
MerryMage
ef6b4f20ca a64_emit_x64: Use xword from Xbyak::util 2018-01-26 18:38:30 +00:00
Lioncash
8c013e7928 General: Convert multiple namespace specifiers to nested namespace specifiers where applicable
Makes namespacing a little less noisy
2018-01-26 17:06:48 +00:00
Lioncash
792cb91753 A64: Zero upper 64 bits in ORN if using the 64-bit variant
Resolves a TODO
2018-01-26 17:06:26 +00:00
Lioncash
07930f0253 unicorn: Display EC and ISS separately beside the full ESR value
Makes it a little nicer to pick out the exception class details at a glance
2018-01-26 12:31:43 +00:00
Lioncash
e99cbcf4e3 unicorn: Use static_cast instead of reinterpret_cast
It's well-defined to cast from void* back to the original pointer type.
2018-01-26 12:31:33 +00:00
MerryMage
a3af4dd218 load_store_register_unprivileged: bug: LDTRSW 2018-01-26 02:03:16 +00:00
MerryMage
06bea0ceaa A64: Implement CMEQ (register, vector) 2018-01-26 01:52:42 +00:00
MerryMage
f7e8a2259a IR: Implement IR instructions VectorEqual{8,16,32,64,128} 2018-01-26 01:52:06 +00:00
MerryMage
f833a17906 reg_alloc: Use std::exchange 2018-01-26 01:51:04 +00:00
Fernando Sahmkow
5ffd11d140 A64: Implemented EOR (vector), ORR (vector, register) and ORN (vector) Instructions (#142) 2018-01-26 00:57:56 +00:00
Lioncash
fc82109071 unicorn_load: Minor Windows-related changes
- Add missing include
- Fix a potential compilation issue where the constructor wouldn't be able to execute, as it would be private.
2018-01-26 00:52:46 +00:00
MerryMage
d08b738662 tests/A64: Test memory writes 2018-01-25 23:56:57 +00:00
MerryMage
d99c99aabb microinstruction: Missed A64{Read,Write}Memory128 from opcode information 2018-01-25 23:56:14 +00:00
MerryMage
85034beaac emit_x64_packed: EmitPackedSubU16 modified xmm_b wasn't writeable
For CPUs that didn't support SSE4.1, this was a bug.
2018-01-25 18:41:53 +00:00
Lioncash
1ffe4e03d9 tests: Fix truncation in GetFpcr() 2018-01-25 18:26:32 +00:00
James Rowe
0cc1bce1a8 Fixup: Xn|SP are 64 bit addresses encoded in the Rn field 2018-01-25 17:46:14 +00:00
James Rowe
76aaa84687 A64: Fix bugs and address review comments 2018-01-25 17:46:14 +00:00
James Rowe
7825ae3a4f Add missing returns 2018-01-25 17:46:14 +00:00
James Rowe
ddb5b3469d A64: Implement Load/Store register (unprivileged) 2018-01-25 17:46:14 +00:00
MerryMage
7f3a790de5 fixup: travis: Test with disabled CPU feature detection 2018-01-24 19:42:54 +00:00
Lioncash
850337e434 CMakeLists: Add opcodes.inc to the source file list
Allows the file to show up nicely within IDEs
2018-01-24 19:42:02 +00:00
MerryMage
7d389fb5f8 travis: Test with disabled CPU feature detection
Ensure that fallbacks are working correctly.
2018-01-24 19:22:45 +00:00
MerryMage
314e020992 IR: Add IR instruction VectorZeroUpper 2018-01-24 17:11:13 +00:00
MerryMage
8ce3e0518a a64_emit_x64: bug: EmitA64WriteMemory128 should write not read 2018-01-24 17:10:44 +00:00
FernandoS27
d1664096f5 Implemented SDIV and UDIV instructions 2018-01-24 17:09:00 +00:00
MerryMage
8873d17db2 A64: Implement LDR/STR (immediate, SIMD&FP) 2018-01-24 16:28:18 +00:00
MerryMage
7f5ce36368 IR: Add IR instructions A64Memory{Read,Write}128
Add the Windows ABI implementation
2018-01-24 16:28:18 +00:00
MerryMage
d6589fe3ee IR: Add IR instructions A64Memory{Read,Write}128
This implementation only works on macOS and Linux.
2018-01-24 16:18:58 +00:00
MerryMage
5421c90216 IR: Add IR instruction VectorGetElement{8,16,32,64} 2018-01-24 16:18:58 +00:00
MerryMage
3932d6d695 IR: Add IR instruction ZeroExtendToQuad 2018-01-24 16:18:58 +00:00
MerryMage
264c446e54 block_of_code: Add ABI_RETURN2 2018-01-24 16:18:58 +00:00
MerryMage
ed63cc7ae9 interface: Move Vector typedef to config.h 2018-01-24 16:18:58 +00:00
MerryMage
ef81c2bcfc bit_util: bug: Infinite loop in HighestSetBit 2018-01-24 16:18:58 +00:00
MerryMage
1db423b2ad A64: Implement DUP (general) 2018-01-24 12:01:26 +00:00
MerryMage
6f1c44e311 IR: Implement Vector{Lower,}Broadcast{8,16,32,64} 2018-01-24 12:01:26 +00:00
Lioncash
cdb588dab5 General: Default constructors and destructors where applicable 2018-01-24 09:07:22 +00:00
Lioncash
e300f1de46 ir_emitter: Remove unused includes 2018-01-24 01:50:10 +00:00
Lioncash
0e5988258d A64: Implement RBIT 2018-01-24 01:49:58 +00:00
MerryMage
ae603909d6 ir_emitted: Remove unimplemented IR instruction Unimplemented 2018-01-23 22:16:15 +00:00
MerryMage
f014a5bec7 emit_x64: Extract BlockRangeInformation, remove template parameter 2018-01-23 19:44:35 +00:00
MerryMage
5f5e664a66 emit_x64: Use JitStateInfo 2018-01-23 19:44:35 +00:00
MerryMage
d52cb2d0de A64: Implement CLS
This is not the cleanest implementation.
2018-01-23 19:44:35 +00:00
MerryMage
24383e543b A64: Implement ADDP (vector) 2018-01-23 17:46:28 +00:00
MerryMage
dfcbe5bd2f IR: Implement Vector{Lower,}PairedAdd{8,16,32,64} 2018-01-23 17:46:28 +00:00
MerryMage
961e64dfaf backend_x64: Split emit_x64 2018-01-23 17:46:28 +00:00
MerryMage
41d9a6421d fuzz_with_unicorn: Compare vectors 2018-01-23 17:46:28 +00:00
MerryMage
2b59e2ba0b microinstruction: bug: Add missing opcodes 2018-01-23 17:46:28 +00:00
Lioncash
bd00d9bc80 A64: Implement SMADDL, SMSUBL, UMADDL, and UMSUBL 2018-01-23 16:08:05 +00:00
Lioncash
768e5bcf9c A64: Implement MADD and MSUB 2018-01-23 16:08:05 +00:00
Lioncash
ffaf837e58 A64: Implement CLZ 2018-01-23 11:55:09 +00:00
Lioncash
585e77d20e opcodes: Add 64-bit CountLeadingZeroes opcode 2018-01-23 11:55:09 +00:00
MerryMage
f2dc9c7727 data_processing_register: Clean-up 2018-01-22 22:47:01 +00:00
Lioncash
efa67caf5f A64: Implement HINT, NOP, YIELD, WFE, WFI, SEV, and SEVL
Truly the most difficult A64 instructions to implement.
2018-01-22 11:54:12 +00:00
Lioncash
692cd6f27b A64: Implement ASRV, LSLV, LSRV, and RORV 2018-01-22 11:51:46 +00:00
Lioncash
a5978a01ca data_processsing_conditional_select: Implement CSINC, CSINV and CSNEG 2018-01-21 23:33:18 +00:00
Lioncash
48e4e021f7 a32/a64_emit_x64: Remove unused includes 2018-01-21 20:09:23 +00:00
MerryMage
a6d17e6bb0 A64: Implement AND (vector) 2018-01-21 18:27:06 +00:00
MerryMage
9634532822 tests/A64: Randomize vectors 2018-01-21 17:56:27 +00:00
MerryMage
adcd34fac7 tests/A64/unicorn: Print interrupt number when InterruptHook is hit 2018-01-21 17:56:27 +00:00
MerryMage
304c91abd3 tests/A64: Allow RunTestInstance to start from an arbitrary offset 2018-01-21 17:56:27 +00:00
MerryMage
d333b5dcee A64: Implement ADD (vector, vector) 2018-01-21 17:56:27 +00:00
Thomas Guillemard
1cf87a24b2 A64: Implement REV, REV32, and REV16 (#126) 2018-01-21 12:17:47 +00:00
MerryMage
9fc1570788 IR: Simplify types. F32 -> U32, F64 -> U64, F128 -> U128
ARM's Architecture Specification Language doesn't distinguish between floats and integers
as much as we do. This makes some things difficult to implement. Since our register
allocator is now capable of allocating values to XMMs and GPRs as necessary, the
Transfer IR instructions are no longer necessary as they used to be and they can be
removed.
2018-01-19 01:09:46 +00:00
MerryMage
50c18181aa reg_alloc: GetBitWidth: Add UNREACHABLE 2018-01-18 23:46:01 +00:00
MerryMage
adccbf3c6b reg_alloc: Consider bitwidth of data and registers when emitting instructions 2018-01-18 13:00:16 +00:00
MerryMage
7b7f239831 A64: Implement CSEL 2018-01-18 11:41:27 +00:00
MerryMage
2f84137f5b IR: Implement Conditional Select 2018-01-18 11:36:52 +00:00
MerryMage
ebb3e80129 A64/tests: Split unicorn sanity checking from other tests 2018-01-17 20:00:42 +00:00
MerryMage
5740a0272c tests/A64: Single random instruction: Test branch instructions as well 2018-01-17 00:35:01 +00:00
MerryMage
0892b487b7 A64/translate/branch: bug: Read-after-write error in BLR 2018-01-17 00:34:33 +00:00
MerryMage
e77bc26945 A64: Implement SBFM, BFM, UBFM 2018-01-17 00:15:44 +00:00
MerryMage
0c37ca71c6 A64: Implement MOVN, MOVZ, MOVK 2018-01-15 21:47:28 +00:00
MerryMage
b6bb592d9a travis: Print current test information 2018-01-14 20:38:50 +00:00
MerryMage
e772072679 fuzz_thumb: Off by one error 2018-01-14 20:37:08 +00:00
MerryMage
a04ca20a89 ir/location_descriptor: Add missing <functional> header for std::hash 2018-01-14 20:23:24 +00:00
MerryMage
1e0f5cd9b9 travis: Run A64 tests 2018-01-14 20:23:24 +00:00
MerryMage
bc73004dd5 a64_merge_interpret_blocks: Remove debug output 2018-01-13 22:05:05 +00:00
MerryMage
4e656ede94 tests/A64: Randomize PSTATE.<NZCV> 2018-01-13 21:57:18 +00:00
MerryMage
fd9530be25 A64: Optimization: Merge interpret blocks 2018-01-13 21:57:18 +00:00
MerryMage
3c9eb04812 testenv: Use format constants 2018-01-13 18:31:39 +00:00
MerryMage
324f3fc2b3 tests/A64: Unicorn interface fixes
- Use a std::unique_ptr instead of new/delete.
- UnmappedMemoryHook: Correct range when wraparound of the address space occurs
- UnmappedMemoryHook: Handle case when we attempt to map the same page twice
2018-01-13 18:30:02 +00:00
MerryMage
98ecbe75ca tests/A64: Fuzz against unicorn 2018-01-13 18:06:06 +00:00
MerryMage
b1d38e7a46 tests/A64: Move TestEnvironment to own header 2018-01-13 18:06:06 +00:00
MerryMage
5218ad97e2 A64/data_processing_pcrel: bug: ADR{,P} instructions sign extend their immediate 2018-01-13 18:06:06 +00:00
MerryMage
b1a8c39c19 A64/data_processing_addsub: bug: {ADD,SUB}S (extended register) instructions write to ZR when d = 31 2018-01-13 18:06:06 +00:00
MerryMage
64827fbe8e a64_emit_x64: bug: A64CallSupervisor trampled callee-save registers 2018-01-13 18:06:06 +00:00
MerryMage
1bfa04d7ac emit_x64: bug: OP m/r64, imm32 form instructions sign-extend their immediate on x64 2018-01-13 18:06:06 +00:00
MerryMage
edadeeabda A64 inferface: Use two argument static_assert
Don't require C++17 in the interface to the library
2018-01-13 18:06:06 +00:00
MerryMage
9ab130490b A64: Add ExceptionRaised IR instruction
The purpose of this instruction is to raise exceptions when certain decode-time
issues happen, instead of asserting at translate time. This allows us to
use the translator for code analysis without worrying about unnecessary asserts,
but also provides flexibility for the library user to perform custom behaviour
when one of these states are raised.
2018-01-13 18:06:06 +00:00
MerryMage
6843eed8de Update readme 2018-01-12 20:05:17 +00:00
MerryMage
7438d07f2b A64/translate: Add TranslateSingleInstruction function 2018-01-12 19:34:25 +00:00
MerryMage
83afe4353c Misc. fixups of MSVC build 2018-01-12 18:13:53 +00:00
MerryMage
ad95a75047 imm: Suppress MSVC warning C4244: value will never be truncated 2018-01-12 17:18:07 +00:00
MerryMage
f8178054d9 Merge remote-tracking branch 'origin/master' into a64 2018-01-12 17:12:18 +00:00
MerryMage
ebaeceec37 fixup! imm: compiler bug: MSVC 19.12 2018-01-12 17:11:42 +00:00
MerryMage
0d65c187a3 tests/a64: Use format constants 2018-01-12 17:02:26 +00:00
MerryMage
3a0b7d59f0 imm: compiler bug: MSVC 19.12 with /permissive- flag doesn't support fold expressions 2018-01-12 17:01:21 +00:00
MerryMage
dd285abec5 A64/decoder: Split decoder data from header 2018-01-11 13:03:56 +00:00
MerryMage
30af089e49 ir_opt: Split off A32 specific passes 2018-01-11 13:03:56 +00:00
MerryMage
648212995c A64: Implement LDP, STP 2018-01-11 13:03:54 +00:00
MerryMage
192e7a73ea A64/location_descriptor: Fix -fpermissive warning on GCC 2018-01-10 18:56:12 +00:00
MerryMage
3721098000 A32/location_descriptor: Disambiguate identifiers
Otherwise produces an -fpermissive error
2018-01-10 18:40:31 +00:00
MerryMage
7c4b318423 externals: Update catch to v2.1.0
This version of catch incorporates a fix for the std::uncaught_exception deprecation warning
2018-01-10 18:32:00 +00:00
MerryMage
a296373f0f Squashed 'externals/fmt/' changes from 39834389..135ab5cf
135ab5cf Update version
93d95f17 Fix markup
4f15c72f Fix markup
e9b19414 Automatically add package to release
c3d1f604 Fix markup
c96062bf Update changelog and version number
f9c97de4 Add note about errno to the documentation
62df6f27 CMakeLists: Use GNUInstallDirs to set install location
493586cb Fix overflow check
1d751bc6 fix warning in header: signed/unsigned comparison
11415bce Update usage.rst
9982dd01 Fix for warning C5030 in VS2015
42e88c4f Silenced MSVC 2017 constant if expression warning
7a9c1ba1 FMT_VARIADIC_CONST - Support for const variadic methods (#591)
324415c0 Use allocator_traits if available.
5f39721c Fix a warning
ca96acbe Add examples
708d9509 fix(Clang CodeGen): remove warnings
9328a074 Fix handling of fixed enums in clang (#580)
2c077dd4 Enable stream exceptions (#581)
933a33a7 Added MSVC checking for support for string_view.
bef89db6 Fix a bogus -Wduplicated-branches gcc warning (#573)
2a619d96 Make format work with C++17 std::string_view (#571)
e051de37 Use less version 2.6.1 and sudo to fix npm install issues on travis
5de459bf Suppress Clang's warning on zero as a null pointer
16589534 Make ArgMap::init not explicitly instantiated (#563)
3e75d3e0 Fix handling of types convertible to int
89654cd1 to_wstring added
37eb419a Fix noreturn attribute detection (#555)
14d85349 Explicitly cast range length to std::size_t to prevent conversion warnings
c2201ce0 Accept wide chars as integers to prevent conversion warning
6efbccb3 Add one more CMake warning fix
032c8380 Fix a segfault in test on glibc 2.26 #551, take 2
6655e804 Fix a segfault in test on glibc 2.26 #551
d16c4d20 Suppress warning about missing noreturn attribute (#549)
9c56a8ce Make format_arg() accept class hierarchies
ca0e3830 Update README.rst
81790d72 Update format.h to remove C4574 error on MSVC 14.2
30283443 Fix undefined behavior in UDL macro
4045d7fe Fix warning about missing ' character
89c3bc58 Remove warning C4668 in MSVC for FMT_GCC_VERSION and FMT_HAS_GXX_CXX11
4af9421f Adding OpenSpace to the list of projects
1a398b54 Fixed CMake CMP0048 warning.
589ccc16 Bump version
c3817046 Add an error on broken includes
16bdd842 Update scripts
b492316d Update version list
91f4ce02 Automatically update version in release script (#431)

git-subtree-dir: externals/fmt
git-subtree-split: 135ab5cf71ed731fc9fa0653051e7d4884a3652f
2018-01-10 18:23:25 +00:00
MerryMage
8cede8126d externals: Update fmt subtree to 4.10
Merge commit 'a296373f0fd1b44a73c9509d0e3c1f2f078ddd42'
2018-01-10 18:23:25 +00:00
MerryMage
89bdade0a0 A64: Implement LDP, STP 2018-01-10 02:05:08 +00:00
MerryMage
16e50ca0db A32: Implement load stores (immediate) 2018-01-10 01:30:30 +00:00
MerryMage
a5caa7cd8d A64: Implement SVC 2018-01-09 21:30:13 +00:00
MerryMage
79091043f0 imm: bug: SignExtend wasn't working for T with bit size > 32 2018-01-09 21:22:17 +00:00
MerryMage
78ffd3da90 a64_emit_x64: Don't use far code for now 2018-01-09 21:21:50 +00:00
MerryMage
347a5c7171 EmitA64SetW: bug: should zero extend to entire 64-bit register 2018-01-09 21:21:15 +00:00
MerryMage
cc647ce869 EmitA64SetNZCV: bug: to_store is scratch 2018-01-09 21:20:55 +00:00
MerryMage
81d9a62345 appveyor: Use a more recent version of boost 2018-01-09 19:12:20 +00:00
MerryMage
c029aef4da emit_x86: Fix nzcv for EmitSub 2018-01-09 18:57:07 +00:00
MerryMage
f19f014a42 A64: Implement SVC 2018-01-09 18:57:07 +00:00
MerryMage
1aa4afaa22 a64_emit_x64: Call interpreter 2018-01-09 18:57:07 +00:00
MerryMage
6633a19d65 A64: Add batch register retrieval to interface 2018-01-09 18:57:06 +00:00
MerryMage
305456b407 A64: Implement compare and branch 2018-01-09 18:57:06 +00:00
MerryMage
08c25c9ae7 A64: PSTATE access and tests 2018-01-09 18:57:06 +00:00
MerryMage
c4abd1fda1 A64: Implement branch (register) 2018-01-09 18:57:06 +00:00
MerryMage
5497fe9056 A64: Implement branch 2018-01-09 18:57:06 +00:00
MerryMage
f3e763a667 A64: Implement logical 2018-01-09 18:57:06 +00:00
MerryMage
f0c29feddb A64: Implement pcrel 2018-01-09 18:57:06 +00:00
MerryMage
8a8dcad250 A64: Implement addsub instructions 2018-01-09 18:57:06 +00:00
MerryMage
1431cedcaa A64: Implement ADD_shifted 2018-01-09 18:57:06 +00:00
MerryMage
ef6fd92fed A64: Backend framework 2018-01-09 18:57:06 +00:00
MerryMage
557fe60164 A64: Initial framework 2018-01-09 18:57:06 +00:00
MerryMage
cc0c084224 CMakeLists: CMAKE_CXX_STANDARD as no effect on MSVC until CMake 3.10
We add the /std:c++latest flag to DYNARMIC_CXX_FLAGS to fix this.
2018-01-09 18:41:22 +00:00
MerryMage
512dae0361 IR: Compile-time type-checking of IR 2018-01-09 18:20:57 +00:00
MerryMage
b88b7ecbbf IR/Value: Rename RegRef and ExtRegRef to A32Reg and A32ExtReg 2018-01-09 18:20:57 +00:00
MerryMage
dbbbf4c331 Make IR->A32 LocationDescriptor conversion explicit 2018-01-09 18:20:57 +00:00
MerryMage
be094ff150 Final A32 refactor 2018-01-09 18:20:57 +00:00
MerryMage
faf64f4a5f EmitX64: JitState type as template parameter 2018-01-09 18:20:57 +00:00
MerryMage
d95a01bcb3 Package up emit context 2018-01-09 18:20:57 +00:00
MerryMage
d67332e333 Rename JitState to A32JitState 2018-01-09 18:20:57 +00:00
MerryMage
053c58f48f backend_x64: Split A32 specific emission into separate class 2018-01-09 18:20:57 +00:00
MerryMage
42c83fadce IR: Split off A32 specific opcodes 2018-01-09 18:20:57 +00:00
MerryMage
f5402c8d82 A32: Split off A32 specific IREmitter 2018-01-09 18:20:57 +00:00
MerryMage
3e569047a5 Label A32 specific code appropriately 2018-01-09 18:20:57 +00:00
MerryMage
305fba50ba Bump requirements to C++17 2018-01-01 20:33:44 +00:00
Phanto-m
672069608f emit_x64: InvalidateCacheRanges: erase blocks after iterating through the map (#124) 2017-12-18 15:13:40 +00:00
MerryMage
ce9c265df0 EmitPackedHalvingSub{U,S}16: SSE2 implementation 2017-12-14 15:08:18 +00:00
MerryMage
13fa10e743 Merge branch 'misc'
These commits introduce context save and restore, and a small number of
optimizations that depend on their use for performance.
2017-12-12 22:07:39 +00:00
MerryMage
a7d2fac2d3 EmitPackedHalvingAddU8: Add SSE2 implementation 2017-12-12 16:11:22 +00:00
MerryMage
16ed4bd511 EmitPackedHalvingAdd{U,S}16: Add SSE2 implementation 2017-12-12 15:57:26 +00:00
MerryMage
afc47e1733 emit_x64: EmitSet{Register,ExtendedRegister32,ExtendedRegister64}: Store from current source 2017-12-12 15:28:37 +00:00
MerryMage
d1d4705364 Add re-entry prediction to avoid std::unordered_map lookups 2017-12-12 15:22:23 +00:00
MerryMage
dd07033dce emit_x64: Optimize code emitted by EmitGetCpsr 2017-12-12 14:25:22 +00:00
MerryMage
c823ecf524 interface: Allow saving and storing of contexts 2017-12-12 14:24:07 +00:00
MerryMage
976a098bf6 jit_state: Split off CPSR.NZCV 2017-12-12 14:24:07 +00:00
MerryMage
cfdc8d882f jit_state: Split off CPSR.Q 2017-12-12 14:23:34 +00:00
MerryMage
2e6eda226c jit_state: Split off CPSR.{E,T}
This allows us to improve code-emission for PopRSBHint. We also improve
code emission other terminals at the same time.
2017-12-12 14:23:34 +00:00
MerryMage
809ca5fcc2 jit_state: Split off CPSR.GE 2017-12-12 14:23:34 +00:00
MerryMage
e1daadff81 jit_state: Hide cpsr implementation 2017-12-12 14:23:34 +00:00
MerryMage
5b23e5b52e emit_x64: Make RSB a stack 2017-12-12 14:23:32 +00:00
MerryMage
2577803203 emit_x64: Arguments to MostSignificantBit and IsZero are 32-bit 2017-12-09 16:26:11 +00:00
MerryMage
199e79cead block_of_code: Remove vzeroupper 2017-12-09 16:26:03 +00:00
MerryMage
a2bd9a0e12 emit_x64: Reduce mxscr operations in EmitGetFpscr and EmitSetFpscr 2017-12-09 16:25:58 +00:00
MerryMage
96ad17ffc2 CMakeLists: Fixup boost
* boost is part of the public interface.
* Consider boost a system library so warnings from boost do not cause a build failure.
* If the parent project defines boost, use that.
2017-12-08 15:15:52 +00:00
MerryMage
5863ea7291 interface_x64: Fix MSVC cast warning 2017-12-07 20:26:46 +00:00
MerryMage
4110494ac4 emit_x64: Use boost::icl::interval_map to speed up ranged invalidation 2017-12-06 20:55:29 +00:00
MerryMage
b6b061f244 emit_x64: Remove unnecessary ABI overhead in ReadMemory, WriteMemory 2017-12-03 19:46:26 +00:00
MerryMage
f343c56268 block_of_code: Move MXCSR switching out of dispatch loop
Also clarify MXCSR entry/exit terminology
2017-12-03 15:39:47 +00:00
MerryMage
651460f941 Merge branch 'timing'
We do this to improve timing information before entering a supervior
function. We also do this to try and stay within JITted code as much
as possible, by updating the cycles we have remaining.
2017-12-03 15:20:43 +00:00
MerryMage
024fa2461c Add AddTicks and GetTicksRemaining callbacks 2017-12-03 15:18:08 +00:00
MerryMage
6131d0e053 BlockOfCode: Detect space remaining
We also clear the code cache when we run out of space.

This closes #111.
2017-12-03 14:32:30 +00:00
MerryMage
bb87d2540c Remove unnecessary use of boost::make_optional
Closes #119.
2017-11-28 20:56:54 +00:00
MerryMage
355d65ec0d CMakeLists: Default to a Release build 2017-11-28 20:08:45 +00:00
MerryMage
5f64bf9cfa decoder_detail: Lambda captures may be unused if iota is an empty sequence
Closes #120
2017-11-28 19:48:32 +00:00
MerryMage
1d75664afd Remove UNUSED macro 2017-11-28 19:44:33 +00:00
MerryMage
67c8e6e695 microinstruction: Remove DecrementRemainingUses 2017-11-27 20:10:23 +00:00
MerryMage
44e6ce33d4 reg_alloc: Add IsLastUse optimization for UseScratch 2017-11-27 19:51:54 +00:00
MerryMage
8e45418630 reg_alloc: Remove reliance on IR::Inst::DecrementRemainingUses 2017-11-27 19:51:54 +00:00
MerryMage
92ae4c783b emit_x86: Standardize time of DefineValue call 2017-11-27 19:51:54 +00:00
MerryMage
6776f83a0c basic_block: Add inst address and use count to DumpBlock
This additional output assists with debugging.
2017-11-27 19:51:54 +00:00
MerryMage
e53d00905f Revert "reg_alloc: Improve performance of HostLocInfo (#112)"
This reverts commit ed4964e8924abfec65d429edcdbb89eb83a17016.

While this may arguably provide a JIT-time benefit, this cannot
possibly provide a runtime benefit.
2017-11-27 19:51:54 +00:00
Mat M
87c9b0affe CMakeLists: Derive the source file listings from targets directly (#118)
This gets rid of the need to store to individual variables before creating
the target itself, cleaning up the variables in the surrounding scope a little bit.
2017-11-26 11:39:27 +00:00
MerryMage
993946fad8 emit_x64: Perform mask creation for packed instructions in SSE 2017-11-25 19:34:30 +00:00
MerryMage
6f4affd67f emit_x64: Eliminate conversion of GE flags
* We do this so that we can simplify PackedSelect.
* We also try to minimise xmm-gpr/gpr-xmm transfers in PackedSelect.
2017-11-25 17:34:39 +00:00
MerryMage
c1dd87aeeb fuzz_arm: Test SEL alongside packed instructions 2017-11-25 17:28:51 +00:00
MerryMage
311b6609aa Implement IR instruction PackedSelect, reimplement SEL 2017-11-25 16:33:48 +00:00
MerryMage
81c5322f40 emit_x64: Remove SSSE3 implementation of PackedHalvingAddU8
It is much slower than the SSE2 implementation, so there's no point keeping it around.
2017-11-25 15:39:06 +00:00
MerryMage
f050825d4d emit_x64: Improve code emission of FPCompare{32,64}
Replace if-chain with table lookup
2017-11-22 17:46:46 +00:00
MerryMage
c421a137c0 VCMP and VCMPE were the other way around
- This was due to a misunderstanding of what the E in VCMPE means.
- The E refers to an exception being raised when a QNaN is encountered.
- Added unit tests for VCMP{E}
2017-11-22 17:45:37 +00:00
MerryMage
3e4b02dd40 skyeye: Correct assumption that VFP_REG_ZERO will always be zero 2017-11-22 17:32:05 +00:00
MerryMage
dfbd3912a4 emit_x64: pmaxuw and pminuw require SSE 4.1
This commit is intended to close citra-emu/citra#3137.

pmaxuw and pminuw were used to perform unsigned comparisons; we emulate
these using a signed comparison by offsetting the inputs by 0x8000 for
CPUs that do not support SSE 4.1.
2017-11-19 23:14:56 +00:00
MerryMage
20b1ac49b1 Merge branch 'subtree'
Remove submodules and use subtrees instead.

The advantage of subtrees is that they would not decay due to link rot
like submodules might.
2017-11-17 11:43:25 +00:00
MerryMage
cc53307857 externals: Add xbyak subtree
Merge commit 'dc792fdb55013abf9ab3913608fe1a7c1c3fe5f3' as 'externals/xbyak'
2017-11-15 20:53:46 +00:00
MerryMage
dc792fdb55 Squashed 'externals/xbyak/' content from commit d512551e
git-subtree-dir: externals/xbyak
git-subtree-split: d512551e914737300ba35f3c049d1b40effbe76d
2017-11-15 20:53:40 +00:00
MerryMage
4b31cb4968 externals: Removed xbyak submodule 2017-11-15 20:51:52 +00:00
MerryMage
f1fe85702d externals: Add fmt subtree
Merge commit '15a8975273ff2ef472939aab4a39a6c4bdc1898d' as 'externals/fmt'
2017-11-15 20:50:35 +00:00
MerryMage
15a8975273 Squashed 'externals/fmt/' content from commit 3983438
git-subtree-dir: externals/fmt
git-subtree-split: 398343897f98b88ade80bbebdcbe82a36c65a980
2017-11-15 20:49:14 +00:00
MerryMage
417dbe1248 externals: Removed fmt submodule 2017-11-15 20:47:41 +00:00
Mat M
185f233bf8 Common: Delete Pool's copy constructor and copy/move assignment operators (#117)
The language defines a copy constructor as:

TypeName(const TypeName&)

so this was just deleting a constructor variant that would catch most cases of attempted copies.
2017-11-12 08:52:34 +00:00
Mat M
c53e0a8768 emit_x64: Amend doxygen parameters for InvalidateCacheRange() (#116) 2017-11-12 08:08:23 +00:00
Mat M
c03aee63e1 externals: Update catch to 2.0.1 (#115)
Keeps the unit testing library up to date.
2017-11-11 05:55:07 +00:00
MerryMage
d3fb603287 block_of_code: Add vzeroupper instructions where AVX-SSE transitions may occur 2017-11-02 20:08:26 +00:00
MerryMage
7b232ea845 block_of_code: BlockOfCode should provide cpu info 2017-11-02 20:06:36 +00:00
yesfish
ed4964e892 reg_alloc: Improve performance of HostLocInfo (#112)
This commit changes the type of HostLocInfo::values from std::vector<Inst*> to std::forward_list<Inst*>.
2017-10-19 02:41:49 +01:00
662 changed files with 173876 additions and 39106 deletions

View File

@ -3,8 +3,6 @@ clone_depth: 5
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
cmake_generator: "Visual Studio 14 2015 Win64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
cmake_generator: "Visual Studio 15 2017 Win64"
@ -17,13 +15,13 @@ configuration:
install:
- git submodule update --init --recursive
- cd externals
- git clone https://github.com/citra-emu/ext-boost boost
- git clone https://github.com/MerryMage/ext-boost boost
- cd ..
before_build:
- mkdir build
- cd build
- cmake .. -G "%cmake_generator%" -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=%cd%/../externals/boost
- cmake .. -G "%cmake_generator%" -DBoost_INCLUDE_DIRS=%cd%/../externals/boost
- cd ..
build:

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Built files
build/
docs/Doxygen/
# Generated files
src/backend/x64/mig/

View File

@ -1,22 +1,66 @@
language: cpp
cache: ccache
matrix:
include:
- os: linux
sudo: required
- env: NAME="Linux Build" GCC_VERSION=7
os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- lib32stdc++6 # For CMake
install: ./.travis/deps-x86_64-linux.sh
script: ./.travis/build-x86_64-linux.sh
- os: osx
- gcc-7
- g++-7
- ninja-build
install: ./.travis/build-x86_64-linux/deps.sh
script: ./.travis/build-x86_64-linux/build.sh
- env: NAME="Linux Build" GCC_VERSION=8
os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- g++-8
- ninja-build
install: ./.travis/build-x86_64-linux/deps.sh
script: ./.travis/build-x86_64-linux/build.sh
- env: NAME="macOS Build"
os: osx
sudo: false
osx_image: xcode7.3
install: ./.travis/deps-x86_64-macos.sh
script: ./.travis/build-x86_64-macos.sh
osx_image: xcode10.2
install: ./.travis/build-x86_64-macos/deps.sh
script: ./.travis/build-x86_64-macos/build.sh
- env: NAME="Test - Fuzz against Unicorn"
os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- llvm-dev
- ninja-build
install: ./.travis/test-with-unicorn-on-x86_64-linux/deps.sh
script: ./.travis/test-with-unicorn-on-x86_64-linux/build.sh
- env: NAME="Test - SSE3 only"
os: linux
dist: bionic
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- llvm-dev
- ninja-build
install: ./.travis/sse3-only-on-x86_64-linux/deps.sh
script: ./.travis/sse3-only-on-x86_64-linux/build.sh

View File

@ -1,14 +0,0 @@
#!/bin/sh
set -e
set -x
export CC=gcc-6
export CXX=g++-6
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir build && cd build
cmake .. -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release
make -j4
ctest -VV -C Release

View File

@ -0,0 +1,14 @@
#!/bin/sh
set -e
set -x
export CC=gcc-${GCC_VERSION}
export CXX=g++-${GCC_VERSION}
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir build && cd build
cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -G Ninja
ninja
./tests/dynarmic_tests --durations yes

View File

@ -5,9 +5,9 @@ set -x
# TODO: This isn't ideal.
cd externals
git clone https://github.com/citra-emu/ext-boost
git clone https://github.com/MerryMage/ext-boost
cd ..
mkdir -p $HOME/.local
curl -L https://cmake.org/files/v3.4/cmake-3.4.1-Linux-i386.tar.gz \
curl -L https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
set -x
set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.9
mkdir build && cd build
cmake .. -GXcode -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DDYNARMIC_TESTS=0
xcodebuild -configuration Release

View File

@ -0,0 +1,11 @@
#!/bin/sh
set -e
set -x
set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.12
mkdir build && cd build
cmake .. -GXcode -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DDYNARMIC_TESTS=0
xcodebuild -configuration Release

View File

@ -5,5 +5,5 @@ set -x
# TODO: This isn't ideal.
cd externals
git clone https://github.com/citra-emu/ext-boost
git clone https://github.com/MerryMage/ext-boost
cd ..

View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
set -x
export CC=gcc-7
export CXX=g++-7
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
export UNICORNDIR=$(pwd)/externals/unicorn
mkdir build && cd build
cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=0 -G Ninja
ninja
./tests/dynarmic_tests --durations yes

View File

@ -0,0 +1,18 @@
#!/bin/sh
set -e
set -x
python3 --version
# TODO: This isn't ideal.
cd externals
git clone https://github.com/MerryMage/ext-boost
git clone https://github.com/MerryMage/unicorn
cd unicorn
UNICORN_ARCHS=aarch64,arm ./make.sh
cd ../..
mkdir -p $HOME/.local
curl -L https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1

View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
set -x
export CC=gcc-7
export CXX=g++-7
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
export UNICORNDIR=$(pwd)/externals/unicorn
mkdir build && cd build
cmake .. -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release -DDYNARMIC_USE_LLVM=1 -DDYNARMIC_TESTS_USE_UNICORN=1 -G Ninja
ninja
./tests/dynarmic_tests --durations yes

View File

@ -0,0 +1,18 @@
#!/bin/sh
set -e
set -x
python3 --version
# TODO: This isn't ideal.
cd externals
git clone https://github.com/MerryMage/ext-boost
git clone https://github.com/MerryMage/unicorn
cd unicorn
UNICORN_ARCHS="arm aarch64" ./make.sh
cd ../..
mkdir -p $HOME/.local
curl -L https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.2)
project(dynarmic CXX)
cmake_minimum_required(VERSION 3.8)
project(dynarmic C CXX)
# Determine if we're built as a subproject (using add_subdirectory)
# or if this is the master project.
@ -9,19 +9,28 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
endif()
# Dynarmic project options
option(DYNARMIC_USE_SYSTEM_BOOST "Use the system boost libraries" ON)
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
option(DYNARMIC_ENABLE_CPU_FEATURE_DETECTION "Turning this off causes dynarmic to assume the host CPU doesn't support anything later than SSE3" ON)
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
option(DYNARMIC_FATAL_ERRORS "Errors are fatal" OFF)
option(DYNARMIC_TESTS "Build tests" ${MASTER_PROJECT})
option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF)
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
option(DYNARMIC_WARNINGS_AS_ERRORS "Warnings as errors" ${MASTER_PROJECT})
if (NOT DEFINED DYNARMIC_FRONTENDS)
set(DYNARMIC_FRONTENDS "A32;A64" CACHE STRING "Selects which frontends to enable")
endif()
# Default to a Release build
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
message(STATUS "Defaulting to a Release build")
endif()
# Set hard requirements for C++
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Warn on CMake API deprecations
set(CMAKE_WARN_DEPRECATED ON)
# Disable in-source builds
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
@ -35,6 +44,7 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules")
# Compiler flags
if (MSVC)
set(DYNARMIC_CXX_FLAGS
/std:c++latest # CMAKE_CXX_STANDARD has no effect on MSVC until CMake 3.10.
/W4
/w34263 # Non-virtual member function hides base class virtual function
/w44265 # Class has virtual functions, but destructor is not virtual
@ -49,8 +59,10 @@ if (MSVC)
/Zi
/Zo
/EHsc
/Zc:throwingNew # Assumes new never returns null
/Zc:inline # Omits inline functions from object-file output
/Zc:externConstexpr # Allows external linkage for variables declared "extern constexpr", as the standard permits.
/Zc:inline # Omits inline functions from object-file output.
/Zc:throwingNew # Assumes new (without std::nothrow) never returns null.
/volatile:iso # Use strict standard-abiding volatile semantics
/DNOMINMAX)
if (DYNARMIC_WARNINGS_AS_ERRORS)
@ -70,43 +82,41 @@ else()
-Wcast-qual
-pedantic
-pedantic-errors
-Wfatal-errors
-Wno-missing-braces)
if (DYNARMIC_WARNINGS_AS_ERRORS)
list(APPEND DYNARMIC_CXX_FLAGS
-Werror)
endif()
if (DYNARMIC_FATAL_ERRORS)
list(APPEND DYNARMIC_CXX_FLAGS
-Wfatal-errors)
endif()
endif()
# Arch detection
include(DetectArchitecture)
if (MSVC)
detect_architecture("_M_AMD64" x86_64)
detect_architecture("_M_IX86" x86)
detect_architecture("_M_ARM" ARM)
detect_architecture("_M_ARM64" Aarch64)
else()
detect_architecture("__x86_64__" x86_64)
detect_architecture("__i386__" x86)
detect_architecture("__arm__" ARM)
detect_architecture("__aarch64__" Aarch64)
endif()
if (NOT DEFINED ARCHITECTURE)
set(ARCHITECTURE "GENERIC")
set(ARCHITECTURE_GENERIC 1)
add_definitions(-DARCHITECTURE_GENERIC=1)
message(FATAL_ERROR "Unsupported architecture encountered. Ending CMake generation.")
endif()
message(STATUS "Target architecture: ${ARCHITECTURE}")
# Include Boost
if(DYNARMIC_USE_SYSTEM_BOOST)
find_package(Boost 1.57.0 REQUIRED)
else()
if(NOT Boost_INCLUDE_DIRS)
message(FATAL_ERROR "Please provide a path to a boost installation using Boost_INCLUDE_DIRS")
if (NOT TARGET boost)
if (NOT Boost_INCLUDE_DIRS)
find_package(Boost 1.57.0 REQUIRED)
endif()
add_library(boost INTERFACE)
target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIRS})
endif()
add_library(boost INTERFACE IMPORTED)
set_property(TARGET boost PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
# Enable unit-testing.
enable_testing(true)
@ -116,7 +126,11 @@ if (DYNARMIC_USE_LLVM)
find_package(LLVM REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(-DDYNARMIC_USE_LLVM ${LLVM_DEFINITIONS})
llvm_map_components_to_libnames(llvm_libs x86desc x86disassembler)
llvm_map_components_to_libnames(llvm_libs aarch64desc aarch64disassembler x86desc x86disassembler)
endif()
if (DYNARMIC_TESTS_USE_UNICORN)
find_package(Unicorn REQUIRED)
endif()
# Pull in externals CMakeLists for libs where available

View File

@ -1,12 +1,14 @@
# This function should be passed a list of all files in a target. It will automatically generate
# This function should be passed a name of an existing target. It will automatically generate
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
# one in the filesystem.
function(create_directory_groups)
function(create_target_directory_groups target_name)
# Place any files that aren't in the source list in a separate group so that they don't get in
# the way.
source_group("Other Files" REGULAR_EXPRESSION ".")
foreach(file_name ${ARGV})
get_target_property(target_sources "${target_name}" SOURCES)
foreach(file_name IN LISTS target_sources)
get_filename_component(dir_name "${file_name}" PATH)
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
string(REPLACE "/" "\\" group_name "${dir_name}")

View File

@ -0,0 +1,37 @@
# Exports:
#
# Variables:
# LIBUNICORN_FOUND
# LIBUNICORN_INCLUDE_DIR
# LIBUNICORN_LIBRARY
#
# Target:
# Unicorn::Unicorn
#
find_path(LIBUNICORN_INCLUDE_DIR
unicorn/unicorn.h
HINTS $ENV{UNICORNDIR}
PATH_SUFFIXES include)
find_library(LIBUNICORN_LIBRARY
NAMES unicorn
HINTS $ENV{UNICORNDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(unicorn DEFAULT_MSG LIBUNICORN_LIBRARY LIBUNICORN_INCLUDE_DIR)
if (UNICORN_FOUND)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
unset(THREADS_PREFER_PTHREAD_FLAG)
add_library(Unicorn::Unicorn UNKNOWN IMPORTED)
set_target_properties(Unicorn::Unicorn PROPERTIES
IMPORTED_LOCATION ${LIBUNICORN_LIBRARY}
INTERFACE_INCLUDE_DIRECTORIES ${LIBUNICORN_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES Threads::Threads
)
endif()
mark_as_advanced(LIBUNICORN_INCLUDE_DIR LIBUNICORN_LIBRARY)

179
README.md
View File

@ -1,10 +1,55 @@
Dynarmic
========
[![Travis CI Build Status](https://api.travis-ci.org/MerryMage/dynarmic.svg?branch=master)](https://travis-ci.org/MerryMage/dynarmic/branches) [![Appveyor CI Build status](https://ci.appveyor.com/api/projects/status/maeiqr41rgm1innm/branch/master?svg=true)](https://ci.appveyor.com/project/MerryMage/dynarmic/branch/master)
A dynamic recompiler for ARM.
### Supported guest architectures
A dynamic recompiler for the ARMv6K architecture.
* ARMv6K
* 64-bit ARMv8
### Supported host architectures
* x86-64
There are no plans to support x86-32.
Alternatives to Dynarmic
------------------------
If you are looking at a recompiler which you can use with minimal effort to run ARM executables on non-native platforms, we would strongly recommend looking at qemu-user-static ([description of qemu-user-static](https://wiki.debian.org/QemuUserEmulation), [using qemu-user-static in combination with Docker to provide a complete emulated environment](https://github.com/multiarch/qemu-user-static)). Having a complete plug-and-play solution is out-of-scope of this project.
Here are some projects with the same goals as dynarmic:
* [ChocolArm64 from Ryujinx](https://github.com/Ryujinx/Ryujinx/tree/master/ChocolArm64) - ARMv8 recompiler on top of RyuJIT
* [Unicorn](https://www.unicorn-engine.org/) - Recompiling multi-architecture CPU emulator, based on QEMU
* [SkyEye](http://skyeye.sourceforge.net) - Cached interpreter for ARM
More general alternatives:
* [tARMac](https://davidsharp.com/tarmac/) - Tarmac's use of armlets was initial inspiration for us to use an intermediate representation
* [QEMU](https://www.qemu.org/) - Recompiling multi-architecture system emulator
* [VisUAL](https://salmanarif.bitbucket.io/visual/index.html) - Visual ARM UAL emulator intended for education
* A wide variety of other recompilers, interpreters and emulators can be found embedded in other projects, here are some we would recommend looking at:
* [firebird's recompiler](https://github.com/nspire-emus/firebird) - Takes more of a call-threaded approach to recompilation
* [higan's arm7tdmi emulator](https://gitlab.com/higan/higan/tree/master/higan/component/processor/arm7tdmi) - Very clean code-style
* [arm-js by ozaki-r](https://github.com/ozaki-r/arm-js) - Emulates ARMv7A and some peripherals of Versatile Express, in the browser
Disadvantages of Dynarmic
-------------------------
In the pursuit of speed, some behavior not commonly depended upon is elided. Therefore this emulator does not match spec.
Known examples:
* Only user-mode is emulated, there is no emulation of any other privilege levels.
* FPSR state is approximate.
* Misaligned loads/stores are not appropriately trapped in certain cases.
* Exclusive monitor behavior may not match any known physical processor.
As with most other hobby ARM emulation projects, no formal verification has been done. Use this code base at your own risk.
Documentation
-------------
@ -14,11 +59,137 @@ Design documentation can be found at [docs/Design.md](docs/Design.md).
Plans
-----
### Near-term
* Complete ARMv8 support
### Medium-term
* [Optimizations](https://github.com/MerryMage/dynarmic/issues/22)
* Optimizations
### Long-term
* ARMv7A support
* ARMv5 support
* ARMv7A guest support
* ARMv5 guest support
* ARMv8 host support
Usage Example
-------------
The below is a minimal example. Bring-your-own memory system.
```cpp
#include <array>
#include <cstdint>
#include <cstdio>
#include <exception>
#include <dynarmic/A32/a32.h>
#include <dynarmic/A32/config.h>
using u8 = std::uint8_t;
using u16 = std::uint16_t;
using u32 = std::uint32_t;
using u64 = std::uint64_t;
class MyEnvironment final : public Dynarmic::A32::UserCallbacks {
public:
u64 ticks_left = 0;
std::array<u8, 2048> memory{};
u8 MemoryRead8(u32 vaddr) override {
if (vaddr >= memory.size()) {
return 0;
}
return memory[vaddr];
}
u16 MemoryRead16(u32 vaddr) override {
return u16(MemoryRead8(vaddr)) | u16(MemoryRead8(vaddr + 1)) << 8;
}
u32 MemoryRead32(u32 vaddr) override {
return u32(MemoryRead16(vaddr)) | u32(MemoryRead16(vaddr + 2)) << 16;
}
u64 MemoryRead64(u32 vaddr) override {
return u64(MemoryRead32(vaddr)) | u64(MemoryRead32(vaddr + 4)) << 32;
}
void MemoryWrite8(u32 vaddr, u8 value) override {
if (vaddr >= memory.size()) {
return;
}
memory[vaddr] = value;
}
void MemoryWrite16(u32 vaddr, u16 value) override {
MemoryWrite8(vaddr, u8(value));
MemoryWrite8(vaddr + 1, u8(value >> 8));
}
void MemoryWrite32(u32 vaddr, u32 value) override {
MemoryWrite16(vaddr, u16(value));
MemoryWrite16(vaddr + 2, u16(value >> 16));
}
void MemoryWrite64(u32 vaddr, u64 value) override {
MemoryWrite32(vaddr, u32(value));
MemoryWrite32(vaddr + 4, u32(value >> 32));
}
void InterpreterFallback(u32 pc, size_t num_instructions) override {
// This is never called in practice.
std::terminate();
}
void CallSVC(u32 swi) override {
// Do something.
}
void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override {
// Do something.
}
void AddTicks(u64 ticks) override {
if (ticks > ticks_left) {
ticks_left = 0;
return;
}
ticks_left -= ticks;
}
u64 GetTicksRemaining() override {
return ticks_left;
}
};
int main(int argc, char** argv) {
MyEnvironment env;
Dynarmic::A32::UserConfig user_config;
user_config.callbacks = &env;
Dynarmic::A32::Jit cpu{user_config};
// Execute at least 1 instruction.
// (Note: More than one instruction may be executed.)
env.ticks_left = 1;
// Write some code to memory.
env.MemoryWrite16(0, 0x0088); // lsls r0, r1, #2
env.MemoryWrite16(2, 0xE7FE); // b +#0 (infinite loop)
// Setup registers.
cpu.Regs()[0] = 1;
cpu.Regs()[1] = 2;
cpu.Regs()[15] = 0; // PC = 0
cpu.SetCpsr(0x00000030); // Thumb mode
// Execute!
cpu.Run();
// Here we would expect cpu.Regs()[0] == 8
printf("R0: %u\n", cpu.Regs()[0]);
return 0;
}
```

View File

@ -4,15 +4,18 @@ Dynarmic is a dynamic recompiler for the ARMv6K architecture. Future plans for d
support for other versions of the ARM architecture, having a interpreter mode, and adding support
for other architectures.
Users of this library interact with it primarily through [`include/dynarmic/dynarmic.h`](../include/dynarmic/dynarmic.h).
Users specify how dynarmic's CPU core interacts with the rest of their systems by setting members of the
[`Dynarmic::UserCallbacks`](../include/dynarmic/callbacks.h) structure as appropriate. Users setup the CPU state using member functions of
`Dynarmic::Jit`, then call `Dynarmic::Jit::Execute` to start CPU execution. The callbacks defined on `UserCallbacks`
may be called from dynamically generated code, so users of the library should not depend on the stack being in a
walkable state for unwinding.
Users of this library interact with it primarily through the interface provided in
[`include/dynarmic`](../include/dynarmic). Users specify how dynarmic's CPU core interacts with
the rest of their system providing an implementation of the relevant `UserCallbacks` interface.
Users setup the CPU state using member functions of `Jit`, then call `Jit::Execute` to start CPU
execution. The callbacks defined on `UserCallbacks` may be called from dynamically generated code,
so users of the library should not depend on the stack being in a walkable state for unwinding.
Dynarmic reads instructions from memory by calling `UserCallbacks::MemoryRead32`. These instructions then pass
through several stages:
* A32: [`Jit`](../include/dynarmic/A32/a32.h), [`UserCallbacks`](../include/dynarmic/A32/config.h)
* A64: [`Jit`](../include/dynarmic/A64/a64.h), [`UserCallbacks`](../include/dynarmic/A64/config.h)
Dynarmic reads instructions from memory by calling `UserCallbacks::MemoryReadCode`. These
instructions then pass through several stages:
1. Decoding (Identifying what type of instruction it is and breaking it up into fields)
2. Translation (Generation of high-level IR from the instruction)
@ -20,39 +23,39 @@ through several stages:
4. Emission (Generation of host-executable code into memory)
5. Execution (Host CPU jumps to the start of emitted code and runs it)
Using the x64 backend as an example:
Using the A32 frontend with the x64 backend as an example:
* Decoding is done by [double dispatch](https://en.wikipedia.org/wiki/Visitor_pattern) in
[`src/frontend/decoder/{arm.h,thumb16.h,thumb32.h}`](../src/frontend/decoder/).
* Translation is done by the visitors in `src/frontend/translate/translate_{arm,thumb}.cpp`.
The function [`IR::Block Translate(LocationDescriptor descriptor, MemoryRead32FuncType memory_read_32)`](../src/frontend/translate/translate.h) takes a
memory location, some CPU state, and memory reader callback and returns a basic block of IR.
[`src/frontend/A32/decoder/{arm.h,thumb16.h,thumb32.h}`](../src/frontend/A32/decoder/).
* Translation is done by the visitors in `src/frontend/A32/translate/translate_{arm,thumb}.cpp`.
The function [`Translate`](../src/frontend/A32/translate/translate.h) takes a starting memory location,
some CPU state, and memory reader callback and returns a basic block of IR.
* The IR can be found under [`src/frontend/ir/`](../src/frontend/ir/).
* Optimizations can be found under [`src/ir_opt/`](../src/ir_opt/).
* Emission is done by `EmitX64` which can be found in `src/backend_x64/emit_x64.{h,cpp}`.
* Execution is performed by calling `BlockOfCode::RunCode` in `src/backend_x64/block_of_code.{h,cpp}`.
## Decoder
The decoder is a double dispatch decoder. Each instruction is represented by a line in the relevant instruction table.
Here is an example line from `g_arm_instruction_table`:
The decoder is a double dispatch decoder. Each instruction is represented by a line in the relevant
instruction table. Here is an example line from [`arm.h`](../src/frontend/A32/decoder/arm.h):
INST(&V::arm_ADC_imm, "ADC (imm)", "cccc0010101Snnnnddddrrrrvvvvvvvv")
(Details on this instruction can be found in section A8.8.1 of the ARMv7-A manual. This is encoding A1.)
The first argument to INST is the member function to call on the visitor. The second argument is a user-readable
The first argument to INST is the member function to call on the visitor. The second argument is a user-readable
instruction name. The third argument is a bit-representation of the instruction.
### Instruction Bit-Representation
Each character in the bitstring represents a bit. A `0` means that that bitposition **must** contain a zero. A `1`
Each character in the bitstring represents a bit. A `0` means that that bitposition **must** contain a zero. A `1`
means that that bitposition **must** contain a one. A `-` means we don't care about the value at that bitposition.
A string of the same character represents a field. In the above example, the first four bits `cccc` represent the
A string of the same character represents a field. In the above example, the first four bits `cccc` represent the
four-bit-long cond field of the ARM Add with Carry (immediate) instruction.
The visitor would have to have a function named `arm_ADC_imm` with 6 arguments, one for each field (`cccc`, `S`,
`nnnn`, `dddd`, `rrrr`, `vvvvvvvv`). If there is a mismatch of field number with argument number, a compile-time
The visitor would have to have a function named `arm_ADC_imm` with 6 arguments, one for each field (`cccc`, `S`,
`nnnn`, `dddd`, `rrrr`, `vvvvvvvv`). If there is a mismatch of field number with argument number, a compile-time
error results.
## Translator
@ -62,9 +65,9 @@ help of the [`IREmitter` class](../src/frontend/ir/ir_emitter.h). An example of
bool ArmTranslatorVisitor::arm_ADC_imm(Cond cond, bool S, Reg n, Reg d, int rotate, Imm8 imm8) {
u32 imm32 = ArmExpandImm(rotate, imm8);
// ADC{S}<c> <Rd>, <Rn>, #<imm>
if (ConditionPassed(cond)) {
auto result = ir.AddWithCarry(ir.GetRegister(n), ir.Imm32(imm32), ir.GetCFlag());
@ -83,22 +86,22 @@ help of the [`IREmitter` class](../src/frontend/ir/ir_emitter.h). An example of
ir.SetVFlag(result.overflow);
}
}
return true;
}
where `ir` is an instance of the `IRBuilder` class. Each member function of the `IRBuilder` class constructs
an IR microinstruction.
## Intermediate Representation
Dynarmic uses an ordered SSA intermediate representation. It is very vaguely similar to those found in other
similar projects like redream, nucleus, and xenia. Major differences are: (1) the abundance of context microinstructions
whereas those projects generally only have two (`load_context`/`store_context`), (2) the explicit handling of
flags as their own values, and (3) very different basic block edge handling.
The intention of the context microinstructions and explicit flag handling is to allow for future optimizations. The
differences in the way edges are handled are a quirk of the current implementation and dynarmic will likely add a
## Intermediate Representation
Dynarmic uses an ordered SSA intermediate representation. It is very vaguely similar to those found in other
similar projects like redream, nucleus, and xenia. Major differences are: (1) the abundance of context
microinstructions whereas those projects generally only have two (`load_context`/`store_context`), (2) the
explicit handling of flags as their own values, and (3) very different basic block edge handling.
The intention of the context microinstructions and explicit flag handling is to allow for future optimizations. The
differences in the way edges are handled are a quirk of the current implementation and dynarmic will likely add a
function analyser in the medium-term future.
Dynarmic's intermediate representation is typed. Each microinstruction may take zero or more arguments and may
@ -106,6 +109,8 @@ return zero or more arguments. A subset of the microinstructions available is do
A complete list of microinstructions can be found in [src/frontend/ir/opcodes.inc](../src/frontend/ir/opcodes.inc).
The below lists some commonly used microinstructions.
### Immediate: Imm{U1,U8,U32,RegRef}
<u1> ImmU1(u1 value)
@ -120,13 +125,13 @@ by the IR.
<u32> GetRegister(<RegRef> reg)
<void> SetRegister(<RegRef> reg, <u32> value)
Gets and sets `JitState::Reg[reg]`. Note that `SetRegister(Arm::Reg::R15, _)` is disallowed by IRBuilder.
Use `{ALU,BX}WritePC` instead.
Note that sequences like `SetRegister(R4, _)` followed by `GetRegister(R4)` are
optimized away.
### Context: {Get,Set}{N,Z,C,V}Flag
<u1> GetNFlag()
@ -143,7 +148,7 @@ Gets and sets bits in `JitState::Cpsr`. Similarly to registers redundant get/set
### Context: BXWritePC
<void> BXWritePC(<u32> value)
This should probably be the last instruction in a translation block unless you're doing something fancy.
This microinstruction sets R15 and CPSR.T as appropriate.
@ -165,73 +170,73 @@ Extract a u16 and u8 respectively from a u32.
<u1> MostSignificantBit(<u32> value)
<u1> IsZero(<u32> value)
These are used to implement ARM flags N and Z. These can often be optimized away by the backend into a host flag read.
### Calculation: LogicalShiftLeft
(<u32> result, <u1> carry_out) LogicalShiftLeft(<u32> operand, <u8> shift_amount, <u1> carry_in)
Pseudocode:
if shift_amount == 0:
return (operand, carry_in)
x = operand * (2 ** shift_amount)
result = Bits<31,0>(x)
carry_out = Bit<32>(x)
return (result, carry_out)
This follows ARM semantics. Note `shift_amount` is not masked to 5 bits (like `SHL` does on x64).
### Calculation: LogicalShiftRight
(<u32> result, <u1> carry_out) LogicalShiftLeft(<u32> operand, <u8> shift_amount, <u1> carry_in)
Pseudocode:
if shift_amount == 0:
return (operand, carry_in)
x = ZeroExtend(operand, from_size: 32, to_size: shift_amount+32)
result = Bits<shift_amount+31,shift_amount>(x)
carry_out = Bit<shift_amount-1>(x)
return (result, carry_out)
This follows ARM semantics. Note `shift_amount` is not masked to 5 bits (like `SHR` does on x64).
### Calculation: ArithmeticShiftRight
(<u32> result, <u1> carry_out) ArithmeticShiftRight(<u32> operand, <u8> shift_amount, <u1> carry_in)
Pseudocode:
if shift_amount == 0:
return (operand, carry_in)
x = SignExtend(operand, from_size: 32, to_size: shift_amount+32)
result = Bits<shift_amount+31,shift_amount>(x)
carry_out = Bit<shift_amount-1>(x)
return (result, carry_out)
This follows ARM semantics. Note `shift_amount` is not masked to 5 bits (like `SAR` does on x64).
### Calcuation: RotateRight
(<u32> result, <u1> carry_out) RotateRight(<u32> operand, <u8> shift_amount, <u1> carry_in)
Pseudocode:
if shift_amount == 0:
return (operand, carry_in)
shift_amount %= 32
result = (operand << shift_amount) | (operand >> (32 - shift_amount))
carry_out = Bit<31>(result)
return (result, carry_out)
### Calculation: AddWithCarry
@ -243,7 +248,7 @@ a + b + carry_in
### Calculation: SubWithCarry
(<u32> result, <u1> carry_out, <u1> overflow) SubWithCarry(<u32> a, <u32> b, <u1> carry_in)
This has equivalent semantics to `AddWithCarry(a, Not(b), carry_in)`.
a - b - !carry_in
@ -251,17 +256,17 @@ a - b - !carry_in
### Calculation: And
<u32> And(<u32> a, <u32> b)
### Calculation: Eor
<u32> Eor(<u32> a, <u32> b)
Exclusive OR (i.e.: XOR)
### Calculation: Or
<u32> Or(<u32> a, <u32> b)
### Calculation: Not
<u32> Not(<u32> value)
@ -282,17 +287,17 @@ Memory access.
### Terminal: Interpret
SetTerm(IR::Term::Interpret{next})
This terminal instruction calls the interpreter, starting at `next`.
The interpreter must interpret exactly one instruction.
### Terminal: ReturnToDispatch
SetTerm(IR::Term::ReturnToDispatch{})
SetTerm(IR::Term::ReturnToDispatch{})
This terminal instruction returns control to the dispatcher.
The dispatcher will use the value in R15 to determine what comes next.
### Terminal: LinkBlock
SetTerm(IR::Term::LinkBlock{next})

View File

@ -2,12 +2,14 @@
`HostLoc`s contain values. A `HostLoc` ("host value location") is either a host CPU register or a host spill location.
Values once set cannot be changed. Values can however be moved by the register allocator between `HostLoc`s. This is handled by the register allocator itself and code that uses the register allocator need not and should not move values between registers.
Values once set cannot be changed. Values can however be moved by the register allocator between `HostLoc`s. This is
handled by the register allocator itself and code that uses the register allocator need not and should not move values
between registers.
The register allocator is based on three concepts: `Use`, `Def` and `Scratch`.
* `Use`: The use of a value.
* `Def`: The definition of a value, this is the only time when a value is set.
* `Define`: The definition of a value, this is the only time when a value is set.
* `Scratch`: Allocate a register that can be freely modified as one wishes.
Note that `Use`ing a value decrements its `use_count` by one. When the `use_count` reaches zero the value is discarded and no longer exists.
@ -23,63 +25,52 @@ At runtime, allocate one of the registers in `desired_locations`. You are free t
### Pure `Use`
Xbyak::Reg64 UseGpr(IR::Value use_value, HostLocList desired_locations = any_gpr);
Xbyak::Xmm UseXmm(IR::Value use_value, HostLocList desired_locations = any_xmm);
OpArg UseOpArg(IR::Value use_value, HostLocList desired_locations);
Xbyak::Reg64 UseGpr(Argument& arg);
Xbyak::Xmm UseXmm(Argument& arg);
OpArg UseOpArg(Argument& arg);
void Use(Argument& arg, HostLoc host_loc);
At runtime, the value corresponding to `use_value` will be placed into one of the `HostLoc`s specified by `desired_locations`. The return value is the actual location.
At runtime, the value corresponding to `arg` will be placed a register. The actual register is determined by
which one of the above functions is called. `UseGpr` places it in an unused GPR, `UseXmm` places it
in an unused XMM register, `UseOpArg` might be in a register or might be a memory location, and `Use` allows
you to specify a specific register (GPR or XMM) to use.
This register **must not** have it's value changed.
* `UseGpr`: The location is a GPR.
* `UseXmm`: The location is an XMM register.
* `UseOpArg`: The location may be one of the locations specified by `desired_locations`, but may also be a host memory reference.
### `UseScratch`
Xbyak::Reg64 UseScratchGpr(IR::Value use_value, HostLocList desired_locations = any_gpr)
Xbyak::Xmm UseScratchXmm(IR::Value use_value, HostLocList desired_locations = any_xmm)
Xbyak::Reg64 UseScratchGpr(Argument& arg);
Xbyak::Xmm UseScratchXmm(Argument& arg);
void UseScratch(Argument& arg, HostLoc host_loc);
At runtime, the value corresponding to `use_value` will be placed into one of the `HostLoc`s specified by `desired_locations`. The return value is the actual location.
At runtime, the value corresponding to `arg` will be placed a register. The actual register is determined by
which one of the above functions is called. `UseScratchGpr` places it in an unused GPR, `UseScratchXmm` places it
in an unused XMM register, and `UseScratch` allows you to specify a specific register (GPR or XMM) to use.
You are free to modify the register. The register is discarded at the end of the allocation scope.
The return value is the register allocated to you.
### `Def`
You are free to modify the value in the register. The register is discarded at the end of the allocation scope.
A `Def` is the defintion of a value. This is the only time when a value may be set.
### `Define` as register
Xbyak::Xmm DefXmm(IR::Inst* def_inst, HostLocList desired_locations = any_xmm)
Xbyak::Reg64 DefGpr(IR::Inst* def_inst, HostLocList desired_locations = any_gpr)
A `Define` is the defintion of a value. This is the only time when a value may be set.
By calling `DefXmm` or `DefGpr`, you are stating that you wish to define the value for `def_inst`, and you wish to write the value to one of the `HostLoc`s specified by `desired_locations`. You must write the value to the register returned.
void DefineValue(IR::Inst* inst, const Xbyak::Reg& reg);
### `AddDef`
By calling `DefineValue`, you are stating that you wish to define the value for `inst`, and you have written the
value to the specified register `reg`.
Adding a `Def` to an existing value.
### `Define`ing as an alias of a different value
void RegisterAddDef(IR::Inst* def_inst, const IR::Value& use_inst);
Adding a `Define` to an existing value.
You are declaring that the value for `def_inst` is the same as the value for `use_inst`. No host machine instructions are emitted.
void DefineValue(IR::Inst* inst, Argument& arg);
### `UseDef`
Xbyak::Reg64 UseDefGpr(IR::Value use_value, IR::Inst* def_inst, HostLocList desired_locations = any_gpr)
Xbyak::Xmm UseDefXmm(IR::Value use_value, IR::Inst* def_inst, HostLocList desired_locations = any_xmm)
At runtime, the value corresponding to `use_value` will be placed into one of the `HostLoc`s specified by `desired_locations`. The return value is the actual location. You must write the value correponding to `def_inst` by the end of the allocation scope.
### `UseDef` (OpArg variant)
std::tuple<OpArg, Xbyak::Reg64> UseDefOpArgGpr(IR::Value use_value, IR::Inst* def_inst, HostLocList desired_locations = any_gpr)
std::tuple<OpArg, Xbyak::Xmm> UseDefOpArgXmm(IR::Value use_value, IR::Inst* def_inst, HostLocList desired_locations = any_xmm)
These have the same semantics as `UseDefGpr` and `UseDefXmm` except `use_value` may not be present in the register, and may actually be in a host memory location.
You are declaring that the value for `inst` is the same as the value for `arg`. No host machine instructions are
emitted.
## When to use each?
The variety of different ways to `Use` and `Def` values are for performance reasons.
* `UseDef`: Instead of performing a `Use` and a `Def`, `UseDef` uses one less register in the case when this `Use` is the last `Use` of a value.
* `UseScratch`: Instead of performing a `Use` and a `Scratch`, `UseScratch` uses one less register in the case when this `Use` is the last `Use` of a value.
* `AddDef`: This drastically reduces the number of registers required when it can be used. It can be used when values are truncations of other values. For example, if `u8_value` contains the truncation of `u32_value`, `AddDef(u8_value, u32_value)` is a valid definition of `u8_value`.
* OpArg variants: Save host code-cache by merging memory loads into other instructions instead of the register allocator having to emit a `mov`.
* Prefer `Use` to `UseScratch` where possible.
* Prefer the `OpArg` variants where possible.
* Prefer to **not** use the specific `HostLoc` variants where possible.

View File

@ -26,10 +26,10 @@ computing a 64-bit `UniqueHash` that is guaranteed to uniquely identify a block.
u64 LocationDescriptor::UniqueHash() const {
// This value MUST BE UNIQUE.
// This calculation has to match up with EmitX64::EmitTerminalPopRSBHint
u64 pc_u64 = u64(arm_pc);
u64 fpscr_u64 = u64(fpscr.Value()) << 32;
u64 t_u64 = cpsr.T() ? (1ull << 35) : 0;
u64 e_u64 = cpsr.E() ? (1ull << 39) : 0;
u64 pc_u64 = u64(arm_pc) << 32;
u64 fpscr_u64 = u64(fpscr.Value());
u64 t_u64 = cpsr.T() ? 1 : 0;
u64 e_u64 = cpsr.E() ? 2 : 0;
return pc_u64 | fpscr_u64 | t_u64 | e_u64;
}
@ -120,12 +120,10 @@ To check if a predicition is in the RSB, we linearly scan the RSB.
using namespace Xbyak::util;
// This calculation has to match up with IREmitter::PushRSB
code->mov(ebx, MJitStateCpsr());
code->mov(ecx, MJitStateReg(Arm::Reg::PC));
code->and_(ebx, u32((1 << 5) | (1 << 9)));
code->shr(ebx, 2);
code->or_(ebx, dword[r15 + offsetof(JitState, FPSCR_mode)]);
code->shl(rbx, 32);
code->shl(rcx, 32);
code->mov(ebx, dword[r15 + offsetof(JitState, FPSCR_mode)]);
code->or_(ebx, dword[r15 + offsetof(JitState, CPSR_et)]);
code->or_(rbx, rcx);
code->mov(rax, u64(code->GetReturnFromRunCodeAddress()));

View File

@ -10,7 +10,7 @@ endif()
if (NOT TARGET xbyak)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
add_library(xbyak INTERFACE)
target_include_directories(xbyak INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak)
target_include_directories(xbyak SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
endif()
@ -18,3 +18,7 @@ endif()
add_library(catch INTERFACE)
target_include_directories(catch INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/catch>)
add_library(mp INTERFACE)
target_include_directories(mp INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mp/include>)

22
externals/README.md vendored Normal file
View File

@ -0,0 +1,22 @@
This repository uses subtrees to manage some of its externals.
## Initial setup
```
git remote add externals-fmt https://github.com/fmtlib/fmt.git
git remote add externals-mp https://github.com/MerryMage/mp.git
git remote add externals-xbyak https://github.com/herumi/xbyak.git
```
## Updating
Change `<ref>` to refer to the appropriate git reference.
```
git fetch externals-fmt
git fetch externals-mp
git fetch externals-xbyak
git subtree pull --squash --prefix=externals/fmt externals-fmt <ref>
git subtree pull --squash --prefix=externals/mp externals-mp <ref>
git subtree pull --squash --prefix=externals/xbyak externals-xbyak <ref>
```

24255
externals/catch/catch.hpp vendored

File diff suppressed because it is too large Load Diff

1
externals/fmt vendored

@ -1 +0,0 @@
Subproject commit 398343897f98b88ade80bbebdcbe82a36c65a980

34
externals/fmt/.gitignore vendored Normal file
View File

@ -0,0 +1,34 @@
.vscode/
*.iml
.idea/
.externalNativeBuild/
.gradle/
gradle/
gradlew*
local.properties
build/
bin/
/_CPack_Packages
/CMakeScripts
/doc/doxyxml
/doc/html
virtualenv
/Testing
/install_manifest.txt
*~
*.a
*.so*
*.xcodeproj
*.zip
cmake_install.cmake
CPack*.cmake
fmt-*.cmake
CTestTestfile.cmake
CMakeCache.txt
CMakeFiles
FMT.build
Makefile
run-msbuild.bat
fmt.pc

128
externals/fmt/.travis.yml vendored Normal file
View File

@ -0,0 +1,128 @@
language: cpp
dist: trusty
sudo: false
os: linux
git:
depth: 1
env:
global:
- secure: |-
a1eovNn4uol9won7ghr67eD3/59oeESN+G9bWE+ecI1V6yRseG9whniGhIpC/YfMW/Qz5I
5sxSmFjaw9bxCISNwUIrL1O5x2AmRYTnFcXk4dFsUvlZg+WeF/aKyBYCNRM8C2ndbBmtAO
o1F2EwFbiso0EmtzhAPs19ujiVxkLn4=
matrix:
include:
# Documentation
- env: BUILD=Doc
sudo: required
# g++ 6 on Linux with C++14
- env: COMPILER=g++-6 BUILD=Debug STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- env: COMPILER=g++-6 BUILD=Release STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
# Apple clang on OS X with C++14
- env: BUILD=Debug STANDARD=14
compiler: clang
os: osx
- env: BUILD=Release STANDARD=14
compiler: clang
os: osx
# clang 6.0 on Linux with C++14
- env: COMPILER=clang++-6.0 BUILD=Debug STANDARD=14
compiler: clang
addons:
apt:
update: true
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-6.0
# clang 4.0 on Linux with C++14
- env: COMPILER=clang++-4.0 BUILD=Debug STANDARD=11
compiler: clang
addons:
apt:
update: true
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-4.0
# g++ 4.8 on Linux with C++11
- env: COMPILER=g++-4.8 BUILD=Debug STANDARD=11
compiler: gcc
# g++ 4.4 on Linux with C++11
- env: COMPILER=g++-4.4 BUILD=Debug STANDARD=11
compiler: gcc
addons:
apt:
update: true
packages:
- g++-4.4
sources:
- ubuntu-toolchain-r-test
# Android
- language: android
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- wget
- unzip
- tree
android:
components:
- tools
- platform-tools
- android-21
env:
- ANDROID=true
before_install:
# Download/Install Gradle
- wget https://services.gradle.org/distributions/gradle-4.10.2-bin.zip
- mkdir -p gradle
- unzip -q -d ./gradle gradle-4.10.2-bin.zip
- export GRADLE=gradle/gradle-4.10.2/bin/gradle
- bash $GRADLE --version
install:
# Accept SDK Licenses + Install NDK
- yes | sdkmanager --update > /dev/null 2>&1
- sdkmanager ndk-bundle > /dev/null 2>&1
before_script:
- pushd ./support
script:
- bash ../$GRADLE clean assemble
after_success:
- popd;
- tree ./libs
before_script:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then export CXX=${COMPILER}; fi
- if [[ "${BUILD}" != "Doc" ]]; then ${CXX} --version; fi
script:
- support/travis-build.py

273
externals/fmt/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,273 @@
cmake_minimum_required(VERSION 3.1.0)
# Use newer policies if available, up to most recent tested version of CMake.
if(${CMAKE_VERSION} VERSION_LESS 3.11)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.11)
endif()
# Determine if fmt is built as a subproject (using add_subdirectory)
# or if it is the master project.
set(MASTER_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MASTER_PROJECT ON)
message(STATUS "CMake version: ${CMAKE_VERSION}")
endif ()
# Joins arguments and places the results in ${result_var}.
function(join result_var)
set(result )
foreach (arg ${ARGN})
set(result "${result}${arg}")
endforeach ()
set(${result_var} "${result}" PARENT_SCOPE)
endfunction()
# Set the default CMAKE_BUILD_TYPE to Release.
# This should be done before the project command since the latter can set
# CMAKE_BUILD_TYPE itself (it does so for nmake).
if (NOT CMAKE_BUILD_TYPE)
join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or "
"CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc})
endif ()
option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF)
option(FMT_WERROR "Halt the compilation with an error on compiler warnings." OFF)
# Options that control generation of various targets.
option(FMT_DOC "Generate the doc target." ${MASTER_PROJECT})
option(FMT_INSTALL "Generate the install target." ${MASTER_PROJECT})
option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
project(FMT)
# Get version from core.h
file(READ include/fmt/core.h core_h)
if (NOT core_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])")
message(FATAL_ERROR "Cannot get FMT_VERSION from core.h.")
endif ()
# Use math to skip leading zeros if any.
math(EXPR CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
math(EXPR CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
math(EXPR CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
join(FMT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.
${CPACK_PACKAGE_VERSION_PATCH})
message(STATUS "Version: ${FMT_VERSION}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/support/cmake")
include(cxx14)
include(CheckCXXCompilerFlag)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic
-Wold-style-cast -Wundef
-Wredundant-decls -Wwrite-strings -Wpointer-arith
-Wcast-qual -Wformat=2 -Wmissing-include-dirs
-Wcast-align -Wnon-virtual-dtor
-Wctor-dtor-privacy -Wdisabled-optimization
-Winvalid-pch -Woverloaded-virtual
-Wconversion
-Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
-Wno-dangling-else -Wno-unused-local-typedefs)
endif ()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wdouble-promotion
-Wtrampolines -Wzero-as-null-pointer-constant -Wuseless-cast
-Wvector-operation-performance -Wsized-deallocation)
endif ()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
-Wnull-dereference -Wduplicated-cond)
endif ()
set(WERROR_FLAG -Werror)
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion)
check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING)
if (HAS_NULLPTR_WARNING)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}
-Wzero-as-null-pointer-constant)
endif ()
set(WERROR_FLAG -Werror)
endif ()
if (MSVC)
set(PEDANTIC_COMPILE_FLAGS /W3)
set(WERROR_FLAG /WX)
endif ()
if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
# If Microsoft SDK is installed create script run-msbuild.bat that
# calls SetEnv.cmd to set up build environment and runs msbuild.
# It is useful when building Visual Studio projects with the SDK
# toolchain rather than Visual Studio.
include(FindSetEnv)
if (WINSDK_SETENV)
set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"")
endif ()
# Set FrameworkPathOverride to get rid of MSB3644 warnings.
set(netfxpath "C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0")
file(WRITE run-msbuild.bat "
${MSBUILD_SETUP}
${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
endif ()
include(CheckSymbolExists)
if (WIN32)
check_symbol_exists(open io.h HAVE_OPEN)
else ()
check_symbol_exists(open fcntl.h HAVE_OPEN)
endif ()
function(add_headers VAR)
set(headers ${${VAR}})
foreach (header ${ARGN})
set(headers ${headers} include/fmt/${header})
endforeach()
set(${VAR} ${headers} PARENT_SCOPE)
endfunction()
# Define the fmt library, its includes and the needed defines.
add_headers(FMT_HEADERS chrono.h color.h core.h format.h format-inl.h locale.h
ostream.h printf.h time.h ranges.h)
set(FMT_SOURCES src/format.cc)
if (HAVE_OPEN)
add_headers(FMT_HEADERS posix.h)
set(FMT_SOURCES ${FMT_SOURCES} src/posix.cc)
endif ()
add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
add_library(fmt::fmt ALIAS fmt)
if (FMT_WERROR)
target_compile_options(fmt PRIVATE ${WERROR_FLAG})
endif ()
if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_target_properties(fmt PROPERTIES
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX d)
if (BUILD_SHARED_LIBS)
if (UNIX AND NOT APPLE)
# Fix rpmlint warning:
# unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
target_link_libraries(fmt -Wl,--as-needed)
endif ()
target_compile_definitions(fmt PRIVATE FMT_EXPORT INTERFACE FMT_SHARED)
endif ()
add_library(fmt-header-only INTERFACE)
add_library(fmt::fmt-header-only ALIAS fmt-header-only)
target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
target_include_directories(fmt-header-only INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
# Install targets.
if (FMT_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING
"Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
set(targets_export_name fmt-targets)
set (INSTALL_TARGETS fmt)
if (TARGET fmt-header-only)
set(INSTALL_TARGETS ${INSTALL_TARGETS} fmt-header-only)
endif ()
set(FMT_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
"Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
"Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
set(FMT_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH
"Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
# Generate the version, config and target files into the build directory.
write_basic_package_version_file(
${version_config}
VERSION ${FMT_VERSION}
COMPATIBILITY AnyNewerVersion)
configure_file(
"${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
"${pkgconfig}"
@ONLY)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
${project_config}
INSTALL_DESTINATION ${FMT_CMAKE_DIR})
# Use a namespace because CMake provides better diagnostics for namespaced
# imported targets.
export(TARGETS ${INSTALL_TARGETS} NAMESPACE fmt::
FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
# Install version, config and target files.
install(
FILES ${project_config} ${version_config}
DESTINATION ${FMT_CMAKE_DIR})
install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
NAMESPACE fmt::)
# Install the library and headers.
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
DESTINATION ${FMT_LIB_DIR})
install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}> DESTINATION ${FMT_LIB_DIR} OPTIONAL)
install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR})
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
endif ()
if (FMT_DOC)
add_subdirectory(doc)
endif ()
if (FMT_TEST)
enable_testing()
add_subdirectory(test)
endif ()
set(gitignore ${PROJECT_SOURCE_DIR}/.gitignore)
if (MASTER_PROJECT AND EXISTS ${gitignore})
# Get the list of ignored files from .gitignore.
file (STRINGS ${gitignore} lines)
LIST(REMOVE_ITEM lines /doc/html)
foreach (line ${lines})
string(REPLACE "." "[.]" line "${line}")
string(REPLACE "*" ".*" line "${line}")
set(ignored_files ${ignored_files} "${line}$" "${line}/")
endforeach ()
set(ignored_files ${ignored_files}
/.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
set(CPACK_PACKAGE_NAME fmt)
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
include(CPack)
endif ()

12
externals/fmt/CONTRIBUTING.rst vendored Normal file
View File

@ -0,0 +1,12 @@
Contributing to fmt
===================
All C++ code must adhere to `Google C++ Style Guide
<https://google.github.io/styleguide/cppguide.html>`_ with the following
exceptions:
* Exceptions are permitted
* snake_case should be used instead of UpperCamelCase for function and type
names
Thanks for contributing!

2002
externals/fmt/ChangeLog.rst vendored Normal file

File diff suppressed because it is too large Load Diff

23
externals/fmt/LICENSE.rst vendored Normal file
View File

@ -0,0 +1,23 @@
Copyright (c) 2012 - 2016, Victor Zverovich
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

519
externals/fmt/README.rst vendored Normal file
View File

@ -0,0 +1,519 @@
{fmt}
=====
.. image:: https://travis-ci.org/fmtlib/fmt.png?branch=master
:target: https://travis-ci.org/fmtlib/fmt
.. image:: https://ci.appveyor.com/api/projects/status/ehjkiefde6gucy1v
:target: https://ci.appveyor.com/project/vitaut/fmt
.. image:: https://badges.gitter.im/Join%20Chat.svg
:alt: Join the chat at https://gitter.im/fmtlib/fmt
:target: https://gitter.im/fmtlib/fmt
**{fmt}** is an open-source formatting library for C++.
It can be used as a safe and fast alternative to (s)printf and IOStreams.
`Documentation <http://fmtlib.net/latest/>`__
This is a development branch that implements the C++ standards proposal `P0645
Text Formatting <http://fmtlib.net/Text%20Formatting.html>`__.
Released versions are available from the `Releases page
<https://github.com/fmtlib/fmt/releases>`__.
Features
--------
* Replacement-based `format API <http://fmtlib.net/dev/api.html>`_ with
positional arguments for localization.
* `Format string syntax <http://fmtlib.net/dev/syntax.html>`_ similar to the one
of `str.format <https://docs.python.org/2/library/stdtypes.html#str.format>`_
in Python.
* Safe `printf implementation
<http://fmtlib.net/latest/api.html#printf-formatting>`_ including
the POSIX extension for positional arguments.
* Support for user-defined types.
* High speed: performance of the format API is close to that of glibc's `printf
<http://en.cppreference.com/w/cpp/io/c/fprintf>`_ and better than the
performance of IOStreams. See `Speed tests`_ and
`Fast integer to string conversion in C++
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_.
* Small code size both in terms of source code (the minimum configuration
consists of just three header files, ``core.h``, ``format.h`` and
``format-inl.h``) and compiled code. See `Compile time and code bloat`_.
* Reliability: the library has an extensive set of `unit tests
<https://github.com/fmtlib/fmt/tree/master/test>`_.
* Safety: the library is fully type safe, errors in format strings can be
reported at compile time, automatic memory management prevents buffer overflow
errors.
* Ease of use: small self-contained code base, no external dependencies,
permissive BSD `license
<https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_
* `Portability <http://fmtlib.net/latest/index.html#portability>`_ with
consistent output across platforms and support for older compilers.
* Clean warning-free codebase even on high warning levels
(``-Wall -Wextra -pedantic``).
* Support for wide strings.
* Optional header-only configuration enabled with the ``FMT_HEADER_ONLY`` macro.
See the `documentation <http://fmtlib.net/latest/>`_ for more details.
Examples
--------
This prints ``Hello, world!`` to stdout:
.. code:: c++
fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax
fmt::printf("Hello, %s!", "world"); // uses printf format string syntax
Arguments can be accessed by position and arguments' indices can be repeated:
.. code:: c++
std::string s = fmt::format("{0}{1}{0}", "abra", "cad");
// s == "abracadabra"
Format strings can be checked at compile time:
.. code:: c++
// test.cc
#define FMT_STRING_ALIAS 1
#include <fmt/format.h>
std::string s = format(fmt("{2}"), 42);
.. code::
$ c++ -Iinclude -std=c++14 test.cc
...
test.cc:4:17: note: in instantiation of function template specialization 'fmt::v5::format<S, int>' requested here
std::string s = format(fmt("{2}"), 42);
^
include/fmt/core.h:778:19: note: non-constexpr function 'on_error' cannot be used in a constant expression
ErrorHandler::on_error(message);
^
include/fmt/format.h:2226:16: note: in call to '&checker.context_->on_error(&"argument index out of range"[0])'
context_.on_error("argument index out of range");
^
{fmt} can be used as a safe portable replacement for ``itoa``
(`godbolt <https://godbolt.org/g/NXmpU4>`_):
.. code:: c++
fmt::memory_buffer buf;
format_to(buf, "{}", 42); // replaces itoa(42, buffer, 10)
format_to(buf, "{:x}", 42); // replaces itoa(42, buffer, 16)
// access the string using to_string(buf) or buf.data()
Formatting of user-defined types is supported via a simple
`extension API <http://fmtlib.net/latest/api.html#formatting-user-defined-types>`_:
.. code:: c++
#include "fmt/format.h"
struct date {
int year, month, day;
};
template <>
struct fmt::formatter<date> {
template <typename ParseContext>
constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const date &d, FormatContext &ctx) {
return format_to(ctx.out(), "{}-{}-{}", d.year, d.month, d.day);
}
};
std::string s = fmt::format("The date is {}", date{2012, 12, 9});
// s == "The date is 2012-12-9"
You can create your own functions similar to `format
<http://fmtlib.net/latest/api.html#format>`_ and
`print <http://fmtlib.net/latest/api.html#print>`_
which take arbitrary arguments (`godbolt <https://godbolt.org/g/MHjHVf>`_):
.. code:: c++
// Prints formatted error message.
void vreport_error(const char *format, fmt::format_args args) {
fmt::print("Error: ");
fmt::vprint(format, args);
}
template <typename... Args>
void report_error(const char *format, const Args & ... args) {
vreport_error(format, fmt::make_format_args(args...));
}
report_error("file not found: {}", path);
Note that ``vreport_error`` is not parameterized on argument types which can
improve compile times and reduce code size compared to fully parameterized
version.
Projects using this library
---------------------------
* `0 A.D. <http://play0ad.com/>`_: A free, open-source, cross-platform real-time
strategy game
* `AMPL/MP <https://github.com/ampl/mp>`_:
An open-source library for mathematical programming
* `AvioBook <https://www.aviobook.aero/en>`_: A comprehensive aircraft
operations suite
* `Celestia <https://celestia.space/>`_: Real-time 3D visualization of space
* `Ceph <https://ceph.com/>`_: A scalable distributed storage system
* `CUAUV <http://cuauv.org/>`_: Cornell University's autonomous underwater
vehicle
* `HarpyWar/pvpgn <https://github.com/pvpgn/pvpgn-server>`_:
Player vs Player Gaming Network with tweaks
* `KBEngine <http://kbengine.org/>`_: An open-source MMOG server engine
* `Keypirinha <http://keypirinha.com/>`_: A semantic launcher for Windows
* `Kodi <https://kodi.tv/>`_ (formerly xbmc): Home theater software
* `Lifeline <https://github.com/peter-clark/lifeline>`_: A 2D game
* `Drake <http://drake.mit.edu/>`_: A planning, control, and analysis toolbox
for nonlinear dynamical systems (MIT)
* `Envoy <https://lyft.github.io/envoy/>`_: C++ L7 proxy and communication bus
(Lyft)
* `FiveM <https://fivem.net/>`_: a modification framework for GTA V
* `MongoDB Smasher <https://github.com/duckie/mongo_smasher>`_: A small tool to
generate randomized datasets
* `OpenSpace <http://openspaceproject.com/>`_: An open-source astrovisualization
framework
* `PenUltima Online (POL) <http://www.polserver.com/>`_:
An MMO server, compatible with most Ultima Online clients
* `quasardb <https://www.quasardb.net/>`_: A distributed, high-performance,
associative database
* `readpe <https://bitbucket.org/sys_dev/readpe>`_: Read Portable Executable
* `redis-cerberus <https://github.com/HunanTV/redis-cerberus>`_: A Redis cluster
proxy
* `rpclib <http://rpclib.net/>`_: A modern C++ msgpack-RPC server and client
library
* `Saddy <https://github.com/mamontov-cpp/saddy-graphics-engine-2d>`_:
Small crossplatform 2D graphic engine
* `Salesforce Analytics Cloud <http://www.salesforce.com/analytics-cloud/overview/>`_:
Business intelligence software
* `Scylla <http://www.scylladb.com/>`_: A Cassandra-compatible NoSQL data store
that can handle 1 million transactions per second on a single server
* `Seastar <http://www.seastar-project.org/>`_: An advanced, open-source C++
framework for high-performance server applications on modern hardware
* `spdlog <https://github.com/gabime/spdlog>`_: Super fast C++ logging library
* `Stellar <https://www.stellar.org/>`_: Financial platform
* `Touch Surgery <https://www.touchsurgery.com/>`_: Surgery simulator
* `TrinityCore <https://github.com/TrinityCore/TrinityCore>`_: Open-source
MMORPG framework
`More... <https://github.com/search?q=cppformat&type=Code>`_
If you are aware of other projects using this library, please let me know
by `email <mailto:victor.zverovich@gmail.com>`_ or by submitting an
`issue <https://github.com/fmtlib/fmt/issues>`_.
Motivation
----------
So why yet another formatting library?
There are plenty of methods for doing this task, from standard ones like
the printf family of function and IOStreams to Boost Format library and
FastFormat. The reason for creating a new library is that every existing
solution that I found either had serious issues or didn't provide
all the features I needed.
Printf
~~~~~~
The good thing about printf is that it is pretty fast and readily available
being a part of the C standard library. The main drawback is that it
doesn't support user-defined types. Printf also has safety issues although
they are mostly solved with `__attribute__ ((format (printf, ...))
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ in GCC.
There is a POSIX extension that adds positional arguments required for
`i18n <https://en.wikipedia.org/wiki/Internationalization_and_localization>`_
to printf but it is not a part of C99 and may not be available on some
platforms.
IOStreams
~~~~~~~~~
The main issue with IOStreams is best illustrated with an example:
.. code:: c++
std::cout << std::setprecision(2) << std::fixed << 1.23456 << "\n";
which is a lot of typing compared to printf:
.. code:: c++
printf("%.2f\n", 1.23456);
Matthew Wilson, the author of FastFormat, referred to this situation with
IOStreams as "chevron hell". IOStreams doesn't support positional arguments
by design.
The good part is that IOStreams supports user-defined types and is safe
although error reporting is awkward.
Boost Format library
~~~~~~~~~~~~~~~~~~~~
This is a very powerful library which supports both printf-like format
strings and positional arguments. Its main drawback is performance.
According to various benchmarks it is much slower than other methods
considered here. Boost Format also has excessive build times and severe
code bloat issues (see `Benchmarks`_).
FastFormat
~~~~~~~~~~
This is an interesting library which is fast, safe and has positional
arguments. However it has significant limitations, citing its author:
Three features that have no hope of being accommodated within the
current design are:
* Leading zeros (or any other non-space padding)
* Octal/hexadecimal encoding
* Runtime width/alignment specification
It is also quite big and has a heavy dependency, STLSoft, which might be
too restrictive for using it in some projects.
Loki SafeFormat
~~~~~~~~~~~~~~~
SafeFormat is a formatting library which uses printf-like format strings
and is type safe. It doesn't support user-defined types or positional
arguments. It makes unconventional use of ``operator()`` for passing
format arguments.
Tinyformat
~~~~~~~~~~
This library supports printf-like format strings and is very small and
fast. Unfortunately it doesn't support positional arguments and wrapping
it in C++98 is somewhat difficult. Also its performance and code compactness
are limited by IOStreams.
Boost Spirit.Karma
~~~~~~~~~~~~~~~~~~
This is not really a formatting library but I decided to include it here
for completeness. As IOStreams it suffers from the problem of mixing
verbatim text with arguments. The library is pretty fast, but slower
on integer formatting than ``fmt::Writer`` on Karma's own benchmark,
see `Fast integer to string conversion in C++
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_.
Benchmarks
----------
Speed tests
~~~~~~~~~~~
The following speed tests results were generated by building
``tinyformat_test.cpp`` on Ubuntu GNU/Linux 14.04.1 with
``g++-4.8.2 -O3 -DSPEED_TEST -DHAVE_FORMAT``, and taking the best of three
runs. In the test, the format string ``"%0.10f:%04d:%+g:%s:%p:%c:%%\n"`` or
equivalent is filled 2000000 times with output sent to ``/dev/null``; for
further details see the `source
<https://github.com/fmtlib/format-benchmark/blob/master/tinyformat_test.cpp>`_.
================= ============= ===========
Library Method Run Time, s
================= ============= ===========
libc printf 1.35
libc++ std::ostream 3.42
fmt 534bff7 fmt::print 1.56
tinyformat 2.0.1 tfm::printf 3.73
Boost Format 1.54 boost::format 8.44
Folly Format folly::format 2.54
================= ============= ===========
As you can see ``boost::format`` is much slower than the alternative methods; this
is confirmed by `other tests <http://accu.org/index.php/journals/1539>`_.
Tinyformat is quite good coming close to IOStreams. Unfortunately tinyformat
cannot be faster than the IOStreams because it uses them internally.
Performance of fmt is close to that of printf, being `faster than printf on integer
formatting <http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_,
but slower on floating-point formatting which dominates this benchmark.
Compile time and code bloat
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The script `bloat-test.py
<https://github.com/fmtlib/format-benchmark/blob/master/bloat-test.py>`_
from `format-benchmark <https://github.com/fmtlib/format-benchmark>`_
tests compile time and code bloat for nontrivial projects.
It generates 100 translation units and uses ``printf()`` or its alternative
five times in each to simulate a medium sized project. The resulting
executable size and compile time (Apple LLVM version 8.1.0 (clang-802.0.42),
macOS Sierra, best of three) is shown in the following tables.
**Optimized build (-O3)**
============= =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============= =============== ==================== ==================
printf 2.6 29 26
printf+string 16.4 29 26
IOStreams 31.1 59 55
fmt 19.0 37 34
tinyformat 44.0 103 97
Boost Format 91.9 226 203
Folly Format 115.7 101 88
============= =============== ==================== ==================
As you can see, fmt has 60% less overhead in terms of resulting binary code
size compared to IOStreams and comes pretty close to ``printf``. Boost Format
and Folly Format have the largest overheads.
``printf+string`` is the same as ``printf`` but with extra ``<string>``
include to measure the overhead of the latter.
**Non-optimized build**
============= =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============= =============== ==================== ==================
printf 2.2 33 30
printf+string 16.0 33 30
IOStreams 28.3 56 52
fmt 18.2 59 50
tinyformat 32.6 88 82
Boost Format 54.1 365 303
Folly Format 79.9 445 430
============= =============== ==================== ==================
``libc``, ``lib(std)c++`` and ``libfmt`` are all linked as shared
libraries to compare formatting function overhead only. Boost Format
and tinyformat are header-only libraries so they don't provide any
linkage options.
Running the tests
~~~~~~~~~~~~~~~~~
Please refer to `Building the library`__ for the instructions on how to build
the library and run the unit tests.
__ http://fmtlib.net/latest/usage.html#building-the-library
Benchmarks reside in a separate repository,
`format-benchmarks <https://github.com/fmtlib/format-benchmark>`_,
so to run the benchmarks you first need to clone this repository and
generate Makefiles with CMake::
$ git clone --recursive https://github.com/fmtlib/format-benchmark.git
$ cd format-benchmark
$ cmake .
Then you can run the speed test::
$ make speed-test
or the bloat test::
$ make bloat-test
FAQ
---
Q: how can I capture formatting arguments and format them later?
A: use ``std::tuple``:
.. code:: c++
template <typename... Args>
auto capture(const Args&... args) {
return std::make_tuple(args...);
}
auto print_message = [](const auto&... args) {
fmt::print(args...);
};
// Capture and store arguments:
auto args = capture("{} {}", 42, "foo");
// Do formatting:
std::apply(print_message, args);
License
-------
fmt is distributed under the BSD `license
<https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_.
The `Format String Syntax
<http://fmtlib.net/latest/syntax.html>`_
section in the documentation is based on the one from Python `string module
documentation <https://docs.python.org/3/library/string.html#module-string>`_
adapted for the current library. For this reason the documentation is
distributed under the Python Software Foundation license available in
`doc/python-license.txt
<https://raw.github.com/fmtlib/fmt/master/doc/python-license.txt>`_.
It only applies if you distribute the documentation of fmt.
Acknowledgments
---------------
The fmt library is maintained by Victor Zverovich (`vitaut
<https://github.com/vitaut>`_) and Jonathan Müller (`foonathan
<https://github.com/foonathan>`_) with contributions from many other people.
See `Contributors <https://github.com/fmtlib/fmt/graphs/contributors>`_ and
`Releases <https://github.com/fmtlib/fmt/releases>`_ for some of the names.
Let us know if your contribution is not listed or mentioned incorrectly and
we'll make it right.
The benchmark section of this readme file and the performance tests are taken
from the excellent `tinyformat <https://github.com/c42f/tinyformat>`_ library
written by Chris Foster. Boost Format library is acknowledged transitively
since it had some influence on tinyformat.
Some ideas used in the implementation are borrowed from `Loki
<http://loki-lib.sourceforge.net/>`_ SafeFormat and `Diagnostic API
<http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html>`_ in
`Clang <http://clang.llvm.org/>`_.
Format string syntax and the documentation are based on Python's `str.format
<http://docs.python.org/2/library/stdtypes.html#str.format>`_.
Thanks `Doug Turnbull <https://github.com/softwaredoug>`_ for his valuable
comments and contribution to the design of the type-safe API and
`Gregory Czajkowski <https://github.com/gcflymoto>`_ for implementing binary
formatting. Thanks `Ruslan Baratov <https://github.com/ruslo>`_ for comprehensive
`comparison of integer formatting algorithms <https://github.com/ruslo/int-dec-format-tests>`_
and useful comments regarding performance, `Boris Kaul <https://github.com/localvoid>`_ for
`C++ counting digits benchmark <https://github.com/localvoid/cxx-benchmark-count-digits>`_.
Thanks to `CarterLi <https://github.com/CarterLi>`_ for contributing various
improvements to the code.

12
externals/fmt/doc/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,12 @@
find_program(DOXYGEN doxygen)
if (NOT DOXYGEN)
message(STATUS "Target 'doc' disabled (requires doxygen)")
return ()
endif ()
add_custom_target(doc
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}
SOURCES api.rst syntax.rst build.py conf.py _templates/layout.html)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
DESTINATION share/doc/fmt OPTIONAL)

File diff suppressed because one or more lines are too long

28
externals/fmt/doc/_static/breathe.css vendored Normal file
View File

@ -0,0 +1,28 @@
/* -- breathe specific styles ----------------------------------------------- */
/* So enum value descriptions are displayed inline to the item */
.breatheenumvalues li tt + p {
display: inline;
}
/* So parameter descriptions are displayed inline to the item */
.breatheparameterlist li tt + p {
display: inline;
}
.container .breathe-sectiondef {
width: inherit;
}
.github-btn {
border: 0;
overflow: hidden;
}
.jumbotron {
background-size: 100% 4px;
background-repeat: repeat-y;
color: white;
text-align: center;
}

Binary file not shown.

View File

@ -0,0 +1,229 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph />
<glyph />
<glyph unicode="&#xd;" />
<glyph unicode=" " />
<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
<glyph unicode="&#xa0;" />
<glyph unicode="&#x2000;" horiz-adv-x="652" />
<glyph unicode="&#x2001;" horiz-adv-x="1304" />
<glyph unicode="&#x2002;" horiz-adv-x="652" />
<glyph unicode="&#x2003;" horiz-adv-x="1304" />
<glyph unicode="&#x2004;" horiz-adv-x="434" />
<glyph unicode="&#x2005;" horiz-adv-x="326" />
<glyph unicode="&#x2006;" horiz-adv-x="217" />
<glyph unicode="&#x2007;" horiz-adv-x="217" />
<glyph unicode="&#x2008;" horiz-adv-x="163" />
<glyph unicode="&#x2009;" horiz-adv-x="260" />
<glyph unicode="&#x200a;" horiz-adv-x="72" />
<glyph unicode="&#x202f;" horiz-adv-x="260" />
<glyph unicode="&#x205f;" horiz-adv-x="326" />
<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#x2601;" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
<glyph unicode="&#xe023;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
<glyph unicode="&#xe026;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
<glyph unicode="&#xe027;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
<glyph unicode="&#xe028;" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
<glyph unicode="&#xe029;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
<glyph unicode="&#xe041;" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
<glyph unicode="&#xe042;" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
<glyph unicode="&#xe062;" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
<glyph unicode="&#xe063;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
<glyph unicode="&#xe079;" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
<glyph unicode="&#xe080;" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
<glyph unicode="&#xe081;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
<glyph unicode="&#xe082;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
<glyph unicode="&#xe083;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
<glyph unicode="&#xe084;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
<glyph unicode="&#xe085;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
<glyph unicode="&#xe086;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
<glyph unicode="&#xe087;" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
<glyph unicode="&#xe088;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
<glyph unicode="&#xe089;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
<glyph unicode="&#xe090;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
<glyph unicode="&#xe095;" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
<glyph unicode="&#xe112;" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
<glyph unicode="&#xe113;" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
<glyph unicode="&#xe114;" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
<glyph unicode="&#xe125;" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
<glyph unicode="&#xe128;" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
<glyph unicode="&#xe130;" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
<glyph unicode="&#xe131;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
<glyph unicode="&#xe132;" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
<glyph unicode="&#xe133;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
<glyph unicode="&#xe134;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
<glyph unicode="&#xe135;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
<glyph unicode="&#xe141;" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
<glyph unicode="&#xe143;" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
<glyph unicode="&#xe161;" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
<glyph unicode="&#xe162;" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
<glyph unicode="&#xe163;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
<glyph unicode="&#xe164;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
<glyph unicode="&#xe165;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
<glyph unicode="&#xe166;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe167;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe168;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe169;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe170;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe171;" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
<glyph unicode="&#xe172;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
<glyph unicode="&#xe173;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
<glyph unicode="&#xe174;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
<glyph unicode="&#xe175;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
<glyph unicode="&#xe176;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
<glyph unicode="&#xe177;" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
<glyph unicode="&#xe178;" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
<glyph unicode="&#xe179;" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
<glyph unicode="&#xe180;" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
<glyph unicode="&#xe181;" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
<glyph unicode="&#xe182;" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
<glyph unicode="&#xe183;" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
<glyph unicode="&#xe184;" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
<glyph unicode="&#xe185;" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
<glyph unicode="&#xe186;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
<glyph unicode="&#xe187;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
<glyph unicode="&#xe188;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
<glyph unicode="&#xe189;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
<glyph unicode="&#xe190;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
<glyph unicode="&#xe191;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
<glyph unicode="&#xe192;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
<glyph unicode="&#xe193;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
<glyph unicode="&#xe194;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
<glyph unicode="&#xe195;" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
<glyph unicode="&#xe197;" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
<glyph unicode="&#xe198;" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
<glyph unicode="&#xe199;" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
<glyph unicode="&#xe200;" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Binary file not shown.

149
externals/fmt/doc/_templates/layout.html vendored Normal file
View File

@ -0,0 +1,149 @@
{% extends "!layout.html" %}
{% block extrahead %}
<meta name="description" content="Small, safe and fast formatting library">
<meta name="keywords" content="C++, formatting, printf, string, library">
<meta name="author" content="Victor Zverovich">
<link rel="stylesheet" href="_static/fmt.css">
{# Google Analytics #}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;
a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-20116650-4', 'fmtlib.net');
ga('send', 'pageview');
</script>
{% endblock %}
{%- macro searchform(classes, button) %}
<form class="{{classes}}" role="search" action="{{ pathto('search') }}"
method="get">
<div class="form-group">
<input type="text" name="q" class="form-control"
{{ 'placeholder="Search"' if not button }} >
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
{% if button %}
<input type="submit" class="btn btn-default" value="search">
{% endif %}
</form>
{%- endmacro %}
{% block header %}
<nav class="navbar navbar-inverse">
<div class="tb-container">
<div class="row">
<div class="navbar-content">
{# Brand and toggle get grouped for better mobile display #}
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">{fmt}</a>
</div>
{# Collect the nav links, forms, and other content for toggling #}
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-expanded="false">{{ version }}
<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% for v in versions.split(',') %}
<li><a href="http://fmtlib.net/{{v}}">{{v}}</a></li>
{% endfor %}
</ul>
</li>
{% for name in ['Contents', 'Usage', 'API', 'Syntax'] %}
{% if pagename == name.lower() %}
<li class="active"><a href="{{name.lower()}}.html">{{name}}
<span class="sr-only">(current)</span></a></li>
{%else%}
<li><a href="{{name.lower()}}.html">{{name}}</a></li>
{%endif%}
{% endfor %}
</ul>
{% if pagename != 'search' %}
{{ searchform('navbar-form navbar-right', False) }}
{%endif%}
</div> {# /.navbar-collapse #}
</div> {# /.col-md-offset-2 #}
</div> {# /.row #}
</div> {# /.tb-container #}
</nav>
{% if pagename == "index" %}
{% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %}
<div class="jumbotron">
<div class="tb-container">
<h1>{fmt}</h1>
<p class="lead">Small, safe and fast formatting library</p>
<div class="btn-group" role="group">
{% set name = 'fmt' if version.split('.')[0]|int >= 3 else 'cppformat' %}
<a class="btn btn-success"
href="{{download_url}}/{{version}}/{{name}}-{{version}}.zip">
<span class="glyphicon glyphicon-download"></span> Download
</a>
<button type="button" class="btn btn-success dropdown-toggle"
data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
{% for v in versions.split(',') %}
{% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %}
<li><a href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}}
</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{# Disable relbars. #}
{% block relbar1 %}
{% endblock %}
{% block relbar2 %}
{% endblock %}
{% block content %}
<div class="tb-container">
<div class="row">
{# Sidebar is currently disabled.
<div class="bs-sidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}"
alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
</div>
</div>
#}
<div class="content">
{% block body %} {% endblock %}
</div>
</div>
</div>
{% endblock %}
{% block footer %}
{{ super() }}
{# Placed at the end of the document so the pages load faster. #}
<script src="_static/bootstrap.min.js"></script>
{% endblock %}

View File

@ -0,0 +1,55 @@
{#
basic/search.html
~~~~~~~~~~~~~~~~~
Template for the search page.
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{% block extrahead %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
</script>
{# this is used when loading the search index using $.ajax fails,
such as on Chrome for documents on localhost #}
<script type="text/javascript" id="searchindexloader"></script>
{{ super() }}
{% endblock %}
{% block body %}
<h1 id="search-documentation">{{ _('Search') }}</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">$('#fallback').hide();</script>
<p>
{% trans %}Please activate JavaScript to enable the search
functionality.{% endtrans %}
</p>
</div>
<p>
{% trans %}From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.{% endtrans %}
</p>
{{ searchform('form-inline', True) }}
{% if search_performed %}
<h2>{{ _('Search Results') }}</h2>
{% if not search_results %}
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
{% endif %}
{% endif %}
<div id="search-results">
{% if search_results %}
<ul>
{% for href, caption, context in search_results %}
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
<div class="context">{{ context|e }}</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}

375
externals/fmt/doc/api.rst vendored Normal file
View File

@ -0,0 +1,375 @@
.. _string-formatting-api:
*************
API Reference
*************
The {fmt} library API consists of the following parts:
* :ref:`fmt/core.h <core-api>`: the core API providing argument handling
facilities and a lightweight subset of formatting functions
* :ref:`fmt/format.h <format-api>`: the full format API providing compile-time
format string checks, output iterator and user-defined type support
* :ref:`fmt/time.h <time-api>`: date and time formatting
* :ref:`fmt/ostream.h <ostream-api>`: ``std::ostream`` support
* :ref:`fmt/printf.h <printf-api>`: ``printf`` formatting
All functions and types provided by the library reside in namespace ``fmt`` and
macros have prefix ``FMT_`` or ``fmt``.
.. _core-api:
Core API
========
``fmt/core.h`` defines the core API which provides argument handling facilities
and a lightweight subset of formatting functions.
The following functions use :ref:`format string syntax <syntax>`
similar to that of Python's `str.format
<http://docs.python.org/3/library/stdtypes.html#str.format>`_.
They take *format_str* and *args* as arguments.
*format_str* is a format string that contains literal text and replacement
fields surrounded by braces ``{}``. The fields are replaced with formatted
arguments in the resulting string. A function taking *format_str* doesn't
participate in an overload resolution if the latter is not a string.
*args* is an argument list representing objects to be formatted.
.. _format:
.. doxygenfunction:: format(const S&, const Args&...)
.. doxygenfunction:: vformat(const S&, basic_format_args<typename buffer_context<Char>::type>)
.. _print:
.. doxygenfunction:: print(const S&, const Args&...)
.. doxygenfunction:: vprint(string_view, format_args)
.. doxygenfunction:: print(std::FILE *, const S&, const Args&...)
.. doxygenfunction:: vprint(std::FILE *, string_view, format_args)
.. doxygenfunction:: vprint(std::FILE *, wstring_view, wformat_args)
Named arguments
---------------
.. doxygenfunction:: fmt::arg(string_view, const T&)
Argument lists
--------------
.. doxygenfunction:: fmt::make_format_args(const Args&...)
.. doxygenclass:: fmt::format_arg_store
:members:
.. doxygenclass:: fmt::basic_format_args
:members:
.. doxygenstruct:: fmt::format_args
.. doxygenclass:: fmt::basic_format_arg
:members:
Compatibility
-------------
.. doxygenclass:: fmt::basic_string_view
:members:
.. doxygentypedef:: fmt::string_view
.. doxygentypedef:: fmt::wstring_view
.. _format-api:
Format API
==========
``fmt/format.h`` defines the full format API providing compile-time format
string checks, output iterator and user-defined type support.
Compile-time format string checks
---------------------------------
.. doxygendefine:: fmt
Formatting user-defined types
-----------------------------
To make a user-defined type formattable, specialize the ``formatter<T>`` struct
template and implement ``parse`` and ``format`` methods::
#include <fmt/format.h>
struct point { double x, y; };
namespace fmt {
template <>
struct formatter<point> {
template <typename ParseContext>
constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const point &p, FormatContext &ctx) {
return format_to(ctx.begin(), "({:.1f}, {:.1f})", p.x, p.y);
}
};
}
Then you can pass objects of type ``point`` to any formatting function::
point p = {1, 2};
std::string s = fmt::format("{}", p);
// s == "(1.0, 2.0)"
In the example above the ``formatter<point>::parse`` function ignores the
contents of the format string referred to by ``ctx.begin()`` so the object will
always be formatted in the same way. See ``formatter<tm>::parse`` in
:file:`fmt/time.h` for an advanced example of how to parse the format string and
customize the formatted output.
You can also reuse existing formatters, for example::
enum class color {red, green, blue};
template <>
struct fmt::formatter<color>: formatter<string_view> {
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
auto format(color c, FormatContext &ctx) {
string_view name = "unknown";
switch (c) {
case color::red: name = "red"; break;
case color::green: name = "green"; break;
case color::blue: name = "blue"; break;
}
return formatter<string_view>::format(name, ctx);
}
};
You can also write a formatter for a hierarchy of classes::
#include <type_traits>
#include <fmt/format.h>
struct A {
virtual ~A() {}
virtual std::string name() const { return "A"; }
};
struct B : A {
virtual std::string name() const { return "B"; }
};
template <typename T>
struct fmt::formatter<T, std::enable_if_t<std::is_base_of<A, T>::value, char>> :
fmt::formatter<std::string> {
template <typename FormatCtx>
auto format(const A& a, FormatCtx& ctx) {
return fmt::formatter<std::string>::format(a.name(), ctx);
}
};
int main() {
B b;
A& a = b;
fmt::print("{}", a); // prints "B"
}
This section shows how to define a custom format function for a user-defined
type. The next section describes how to get ``fmt`` to use a conventional stream
output ``operator<<`` when one is defined for a user-defined type.
Output iterator support
-----------------------
.. doxygenfunction:: fmt::format_to(OutputIt, const S&, const Args&...)
.. doxygenfunction:: fmt::format_to_n(OutputIt, std::size_t, string_view, const Args&...)
.. doxygenstruct:: fmt::format_to_n_result
:members:
Literal-based API
-----------------
The following user-defined literals are defined in ``fmt/format.h``.
.. doxygenfunction:: operator""_format(const char *, std::size_t)
.. doxygenfunction:: operator""_a(const char *, std::size_t)
Utilities
---------
.. doxygentypedef:: fmt::char_t
.. doxygenfunction:: fmt::formatted_size(string_view, const Args&...)
.. doxygenfunction:: fmt::to_string(const T&)
.. doxygenfunction:: fmt::to_wstring(const T&)
.. doxygenfunction:: fmt::to_string_view(basic_string_view<Char>)
.. doxygenclass:: fmt::basic_memory_buffer
:protected-members:
:members:
System errors
-------------
fmt does not use ``errno`` to communicate errors to the user, but it may call
system functions which set ``errno``. Users should not make any assumptions about
the value of ``errno`` being preserved by library functions.
.. doxygenclass:: fmt::system_error
:members:
.. doxygenfunction:: fmt::format_system_error
.. doxygenclass:: fmt::windows_error
:members:
.. _formatstrings:
Custom allocators
-----------------
The {fmt} library supports custom dynamic memory allocators.
A custom allocator class can be specified as a template argument to
:class:`fmt::basic_memory_buffer`::
using custom_memory_buffer =
fmt::basic_memory_buffer<char, fmt::inline_buffer_size, custom_allocator>;
It is also possible to write a formatting function that uses a custom
allocator::
using custom_string =
std::basic_string<char, std::char_traits<char>, custom_allocator>;
custom_string vformat(custom_allocator alloc, fmt::string_view format_str,
fmt::format_args args) {
custom_memory_buffer buf(alloc);
fmt::vformat_to(buf, format_str, args);
return custom_string(buf.data(), buf.size(), alloc);
}
template <typename ...Args>
inline custom_string format(custom_allocator alloc,
fmt::string_view format_str,
const Args & ... args) {
return vformat(alloc, format_str, fmt::make_format_args(args...));
}
The allocator will be used for the output container only. If you are using named
arguments, the container that stores pointers to them will be allocated using
the default allocator. Also floating-point formatting falls back on ``sprintf``
which may do allocations.
Custom formatting of built-in types
-----------------------------------
It is possible to change the way arguments are formatted by providing a
custom argument formatter class::
using arg_formatter =
fmt::arg_formatter<fmt::back_insert_range<fmt::internal::buffer>>;
// A custom argument formatter that formats negative integers as unsigned
// with the ``x`` format specifier.
class custom_arg_formatter : public arg_formatter {
public:
custom_arg_formatter(fmt::format_context &ctx,
fmt::format_specs *spec = nullptr)
: arg_formatter(ctx, spec) {}
using arg_formatter::operator();
auto operator()(int value) {
if (spec().type() == 'x')
return (*this)(static_cast<unsigned>(value)); // convert to unsigned and format
return arg_formatter::operator()(value);
}
};
std::string custom_vformat(fmt::string_view format_str, fmt::format_args args) {
fmt::memory_buffer buffer;
// Pass custom argument formatter as a template arg to vformat_to.
fmt::vformat_to<custom_arg_formatter>(buffer, format_str, args);
return fmt::to_string(buffer);
}
template <typename ...Args>
inline std::string custom_format(
fmt::string_view format_str, const Args &... args) {
return custom_vformat(format_str, fmt::make_format_args(args...));
}
std::string s = custom_format("{:x}", -42); // s == "ffffffd6"
.. doxygenclass:: fmt::arg_formatter
:members:
.. _time-api:
Date and time formatting
========================
The library supports `strftime
<http://en.cppreference.com/w/cpp/chrono/c/strftime>`_-like date and time
formatting::
#include <fmt/time.h>
std::time_t t = std::time(nullptr);
// Prints "The date is 2016-04-29." (with the current date)
fmt::print("The date is {:%Y-%m-%d}.", *std::localtime(&t));
The format string syntax is described in the documentation of
`strftime <http://en.cppreference.com/w/cpp/chrono/c/strftime>`_.
.. _ostream-api:
``std::ostream`` support
========================
``fmt/ostream.h`` provides ``std::ostream`` support including formatting of
user-defined types that have overloaded ``operator<<``::
#include <fmt/ostream.h>
class date {
int year_, month_, day_;
public:
date(int year, int month, int day): year_(year), month_(month), day_(day) {}
friend std::ostream &operator<<(std::ostream &os, const date &d) {
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
}
};
std::string s = fmt::format("The date is {}", date(2012, 12, 9));
// s == "The date is 2012-12-9"
.. doxygenfunction:: print(std::basic_ostream<fmt::char_t<S>>&, const S&, const Args&...)
.. _printf-api:
``printf`` formatting
=====================
The header ``fmt/printf.h`` provides ``printf``-like formatting functionality.
The following functions use `printf format string syntax
<http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html>`_ with
the POSIX extension for positional arguments. Unlike their standard
counterparts, the ``fmt`` functions are type-safe and throw an exception if an
argument type doesn't match its format specification.
.. doxygenfunction:: printf(const S&, const Args&...)
.. doxygenfunction:: fprintf(std::FILE *, const S&, const Args&...)
.. doxygenfunction:: fprintf(std::basic_ostream<fmt::char_t<S>>&, const S&, const Args&...)
.. doxygenfunction:: sprintf(const S&, const Args&...)

View File

@ -0,0 +1,2 @@
Sphinx basic theme with Bootstrap support. Modifications are kept to
a minimum to simplify integration in case of changes to Sphinx theming.

View File

@ -0,0 +1,206 @@
{#
basic/layout.html
~~~~~~~~~~~~~~~~~
Master layout template for Sphinx themes.
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- macro relbar() %}
<div class="related" role="navigation" aria-label="related navigation">
<h3>{{ _('Navigation') }}</h3>
<ul>
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %}
{%- block rootrellink %}
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
{%- endblock %}
{%- for parent in parents %}
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
{%- endfor %}
{%- block relbaritems %} {% endblock %}
</ul>
</div>
{%- endmacro %}
{%- macro sidebar() %}
{%- if render_sidebar %}
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- include "sourcelink.html" %}
{%- endblock %}
{%- if customsidebar %}
{%- include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- include "searchbox.html" %}
{%- endblock %}
{%- endif %}
</div>
</div>
{%- endif %}
{%- endmacro %}
{%- macro script() %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
{%- endmacro %}
<html lang="en">
<head>
<meta charset="{{ encoding }}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# The above 3 meta tags *must* come first in the head; any other head content
must come *after* these tags. #}
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{{ css() }}
{%- if not embedded %}
{{ script() }}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
<body role="document">
{%- block header %}{% endblock %}
{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block content %}
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
<div class="document">
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
<div class="clearer"></div>
</div>
{%- endblock %}
{%- block relbar2 %}{{ relbar() }}{% endblock %}
{%- block footer %}
<div class="footer" role="contentinfo">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
{%- endblock %}
</body>
</html>

View File

@ -0,0 +1,2 @@
[theme]
inherit = basic

73
externals/fmt/doc/bootstrap/alerts.less vendored Normal file
View File

@ -0,0 +1,73 @@
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert {
padding: @alert-padding;
margin-bottom: @line-height-computed;
border: 1px solid transparent;
border-radius: @alert-border-radius;
// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing @headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: @alert-link-font-weight;
}
// Improve alignment and spacing of inner content
> p,
> ul {
margin-bottom: 0;
}
> p + p {
margin-top: 5px;
}
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissible {
padding-right: (@alert-padding + 20);
// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
}
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
.alert-success {
.alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
}
.alert-info {
.alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
}
.alert-warning {
.alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
}
.alert-danger {
.alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
}

66
externals/fmt/doc/bootstrap/badges.less vendored Normal file
View File

@ -0,0 +1,66 @@
//
// Badges
// --------------------------------------------------
// Base class
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: @font-size-small;
font-weight: @badge-font-weight;
color: @badge-color;
line-height: @badge-line-height;
vertical-align: baseline;
white-space: nowrap;
text-align: center;
background-color: @badge-bg;
border-radius: @badge-border-radius;
// Empty badges collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for badges in buttons
.btn & {
position: relative;
top: -1px;
}
.btn-xs &,
.btn-group-xs > .btn & {
top: 0;
padding: 1px 5px;
}
// Hover state, but only for links
a& {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Account for badges in navs
.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.list-group-item > & {
float: right;
}
.list-group-item > & + & {
margin-right: 5px;
}
.nav-pills > li > a > & {
margin-left: 3px;
}
}

View File

@ -0,0 +1,50 @@
// Core variables and mixins
@import "variables.less";
@import "mixins.less";
// Reset and dependencies
@import "normalize.less";
@import "print.less";
@import "glyphicons.less";
// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "tables.less";
@import "forms.less";
@import "buttons.less";
// Components
@import "component-animations.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";
@import "labels.less";
@import "badges.less";
@import "jumbotron.less";
@import "thumbnails.less";
@import "alerts.less";
@import "progress-bars.less";
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";
// Components w/ JavaScript
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
@import "carousel.less";
// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";

View File

@ -0,0 +1,26 @@
//
// Breadcrumbs
// --------------------------------------------------
.breadcrumb {
padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
margin-bottom: @line-height-computed;
list-style: none;
background-color: @breadcrumb-bg;
border-radius: @border-radius-base;
> li {
display: inline-block;
+ li:before {
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
padding: 0 5px;
color: @breadcrumb-color;
}
}
> .active {
color: @breadcrumb-active-color;
}
}

View File

@ -0,0 +1,243 @@
//
// Button groups
// --------------------------------------------------
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
float: left;
// Bring the "active" button to the front
&:hover,
&:focus,
&:active,
&.active {
z-index: 2;
}
}
}
// Prevent double borders when buttons are next to each other
.btn-group {
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -1px;
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all);
.btn-group,
.input-group {
float: left;
}
> .btn,
> .btn-group,
> .input-group {
margin-left: 5px;
}
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
&:not(:last-child):not(.dropdown-toggle) {
.border-right-radius(0);
}
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
.border-left-radius(0);
}
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
.border-right-radius(0);
}
}
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
.border-left-radius(0);
}
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-xs > .btn { &:extend(.btn-xs); }
.btn-group-sm > .btn { &:extend(.btn-sm); }
.btn-group-lg > .btn { &:extend(.btn-lg); }
// Split button dropdowns
// ----------------------
// Give the line between buttons some depth
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
// The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state
.btn-group.open .dropdown-toggle {
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
.box-shadow(none);
}
}
// Reposition the caret
.btn .caret {
margin-left: 0;
}
// Carets in other button sizes
.btn-lg .caret {
border-width: @caret-width-large @caret-width-large 0;
border-bottom-width: 0;
}
// Upside down carets for .dropup
.dropup .btn-lg .caret {
border-width: 0 @caret-width-large @caret-width-large;
}
// Vertical button groups
// ----------------------
.btn-group-vertical {
> .btn,
> .btn-group,
> .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
// Clear floats so dropdown menus can be properly placed
> .btn-group {
&:extend(.clearfix all);
> .btn {
float: none;
}
}
> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
}
.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:first-child:not(:last-child) {
border-top-right-radius: @border-radius-base;
.border-bottom-radius(0);
}
&:last-child:not(:first-child) {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0);
}
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
.border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
.border-top-radius(0);
}
// Justified button groups
// ----------------------
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
> .btn,
> .btn-group {
float: none;
display: table-cell;
width: 1%;
}
> .btn-group .btn {
width: 100%;
}
> .btn-group .dropdown-menu {
left: auto;
}
}
// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
// `display: none;` or `visibility: hidden;` as that also hides the popover.
// Simply visually hiding the inputs via `opacity` would leave them clickable in
// certain cases which is prevented by using `clip` and `pointer-events`.
// This way, we ensure a DOM element is visible to position the popover from.
//
// See https://github.com/twbs/bootstrap/pull/12794 and
// https://github.com/twbs/bootstrap/pull/14559 for more information.
[data-toggle="buttons"] {
> .btn,
> .btn-group > .btn {
input[type="radio"],
input[type="checkbox"] {
position: absolute;
clip: rect(0,0,0,0);
pointer-events: none;
}
}
}

160
externals/fmt/doc/bootstrap/buttons.less vendored Normal file
View File

@ -0,0 +1,160 @@
//
// Buttons
// --------------------------------------------------
// Base styles
// --------------------------------------------------
.btn {
display: inline-block;
margin-bottom: 0; // For input.btn
font-weight: @btn-font-weight;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
white-space: nowrap;
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
.user-select(none);
&,
&:active,
&.active {
&:focus,
&.focus {
.tab-focus();
}
}
&:hover,
&:focus,
&.focus {
color: @btn-default-color;
text-decoration: none;
}
&:active,
&.active {
outline: 0;
background-image: none;
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: @cursor-disabled;
pointer-events: none; // Future-proof disabling of clicks
.opacity(.65);
.box-shadow(none);
}
}
// Alternate buttons
// --------------------------------------------------
.btn-default {
.button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
}
.btn-primary {
.button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
}
// Success appears as green
.btn-success {
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}
// Warning appears as orange
.btn-warning {
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
}
// Danger and error appear as red
.btn-danger {
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
// Link buttons
// -------------------------
// Make a button look and behave like a link
.btn-link {
color: @link-color;
font-weight: normal;
border-radius: 0;
&,
&:active,
&.active,
&[disabled],
fieldset[disabled] & {
background-color: transparent;
.box-shadow(none);
}
&,
&:hover,
&:focus,
&:active {
border-color: transparent;
}
&:hover,
&:focus {
color: @link-hover-color;
text-decoration: @link-hover-decoration;
background-color: transparent;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @btn-link-disabled-color;
text-decoration: none;
}
}
}
// Button Sizes
// --------------------------------------------------
.btn-lg {
// line-height: ensure even-numbered height of button next to large input
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}
.btn-sm {
// line-height: ensure proper height of button next to small input
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
.btn-xs {
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
// Block button
// --------------------------------------------------
.btn-block {
display: block;
width: 100%;
}
// Vertically space out multiple block buttons
.btn-block + .btn-block {
margin-top: 5px;
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}

View File

@ -0,0 +1,269 @@
//
// Carousel
// --------------------------------------------------
// Wrapper for the slide container and indicators
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
overflow: hidden;
width: 100%;
> .item {
display: none;
position: relative;
.transition(.6s ease-in-out left);
// Account for jankitude on images
> img,
> a > img {
&:extend(.img-responsive);
line-height: 1;
}
// WebKit CSS3 transforms for supported devices
@media all and (transform-3d), (-webkit-transform-3d) {
.transition-transform(~'0.6s ease-in-out');
.backface-visibility(~'hidden');
.perspective(1000);
&.next,
&.active.right {
.translate3d(100%, 0, 0);
left: 0;
}
&.prev,
&.active.left {
.translate3d(-100%, 0, 0);
left: 0;
}
&.next.left,
&.prev.right,
&.active {
.translate3d(0, 0, 0);
left: 0;
}
}
}
> .active,
> .next,
> .prev {
display: block;
}
> .active {
left: 0;
}
> .next,
> .prev {
position: absolute;
top: 0;
width: 100%;
}
> .next {
left: 100%;
}
> .prev {
left: -100%;
}
> .next.left,
> .prev.right {
left: 0;
}
> .active.left {
left: -100%;
}
> .active.right {
left: 100%;
}
}
// Left/right controls for nav
// ---------------------------
.carousel-control {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: @carousel-control-width;
.opacity(@carousel-control-opacity);
font-size: @carousel-control-font-size;
color: @carousel-control-color;
text-align: center;
text-shadow: @carousel-text-shadow;
// We can't have this transition here because WebKit cancels the carousel
// animation if you trip this while in the middle of another animation.
// Set gradients for backgrounds
&.left {
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
}
&.right {
left: auto;
right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
}
// Hover/focus state
&:hover,
&:focus {
outline: 0;
color: @carousel-control-color;
text-decoration: none;
.opacity(.9);
}
// Toggles
.icon-prev,
.icon-next,
.glyphicon-chevron-left,
.glyphicon-chevron-right {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.icon-prev,
.glyphicon-chevron-left {
left: 50%;
margin-left: -10px;
}
.icon-next,
.glyphicon-chevron-right {
right: 50%;
margin-right: -10px;
}
.icon-prev,
.icon-next {
width: 20px;
height: 20px;
margin-top: -10px;
line-height: 1;
font-family: serif;
}
.icon-prev {
&:before {
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
}
}
.icon-next {
&:before {
content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
}
}
}
// Optional indicator pips
//
// Add an unordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
position: absolute;
bottom: 10px;
left: 50%;
z-index: 15;
width: 60%;
margin-left: -30%;
padding-left: 0;
list-style: none;
text-align: center;
li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
border: 1px solid @carousel-indicator-border-color;
border-radius: 10px;
cursor: pointer;
// IE8-9 hack for event handling
//
// Internet Explorer 8-9 does not support clicks on elements without a set
// `background-color`. We cannot use `filter` since that's not viewed as a
// background color by the browser. Thus, a hack is needed.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
//
// For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
// set alpha transparency for the best results possible.
background-color: #000 \9; // IE8
background-color: rgba(0,0,0,0); // IE9
}
.active {
margin: 0;
width: 12px;
height: 12px;
background-color: @carousel-indicator-active-bg;
}
}
// Optional captions
// -----------------------------
// Hidden by default for smaller viewports
.carousel-caption {
position: absolute;
left: 15%;
right: 15%;
bottom: 20px;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: @carousel-caption-color;
text-align: center;
text-shadow: @carousel-text-shadow;
& .btn {
text-shadow: none; // No shadow for button elements in carousel-caption
}
}
// Scale up controls for tablets and up
@media screen and (min-width: @screen-sm-min) {
// Scale up the controls a smidge
.carousel-control {
.glyphicon-chevron-left,
.glyphicon-chevron-right,
.icon-prev,
.icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
}
.glyphicon-chevron-left,
.icon-prev {
margin-left: -15px;
}
.glyphicon-chevron-right,
.icon-next {
margin-right: -15px;
}
}
// Show and left align the captions
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
// Move up the indicators
.carousel-indicators {
bottom: 20px;
}
}

34
externals/fmt/doc/bootstrap/close.less vendored Normal file
View File

@ -0,0 +1,34 @@
//
// Close icons
// --------------------------------------------------
.close {
float: right;
font-size: (@font-size-base * 1.5);
font-weight: @close-font-weight;
line-height: 1;
color: @close-color;
text-shadow: @close-text-shadow;
.opacity(.2);
&:hover,
&:focus {
color: @close-color;
text-decoration: none;
cursor: pointer;
.opacity(.5);
}
// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
button& {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
}

69
externals/fmt/doc/bootstrap/code.less vendored Normal file
View File

@ -0,0 +1,69 @@
//
// Code (inline and block)
// --------------------------------------------------
// Inline and block code styles
code,
kbd,
pre,
samp {
font-family: @font-family-monospace;
}
// Inline code
code {
padding: 2px 4px;
font-size: 90%;
color: @code-color;
background-color: @code-bg;
border-radius: @border-radius-base;
}
// User input typically entered via keyboard
kbd {
padding: 2px 4px;
font-size: 90%;
color: @kbd-color;
background-color: @kbd-bg;
border-radius: @border-radius-small;
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
box-shadow: none;
}
}
// Blocks of code
pre {
display: block;
padding: ((@line-height-computed - 1) / 2);
margin: 0 0 (@line-height-computed / 2);
font-size: (@font-size-base - 1); // 14px to 13px
line-height: @line-height-base;
word-break: break-all;
word-wrap: break-word;
color: @pre-color;
background-color: @pre-bg;
border: 1px solid @pre-border-color;
border-radius: @border-radius-base;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
}
// Enable scrollable blocks of code
.pre-scrollable {
max-height: @pre-scrollable-max-height;
overflow-y: scroll;
}

View File

@ -0,0 +1,33 @@
//
// Component animations
// --------------------------------------------------
// Heads up!
//
// We don't use the `.opacity()` mixin here since it causes a bug with text
// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
.fade {
opacity: 0;
.transition(opacity .15s linear);
&.in {
opacity: 1;
}
}
.collapse {
display: none;
&.in { display: block; }
tr&.in { display: table-row; }
tbody&.in { display: table-row-group; }
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
.transition-property(~"height, visibility");
.transition-duration(.35s);
.transition-timing-function(ease);
}

View File

@ -0,0 +1,214 @@
//
// Dropdown menus
// --------------------------------------------------
// Dropdown arrow/caret
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: @caret-width-base dashed;
border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent;
}
// The dropdown wrapper (div)
.dropup,
.dropdown {
position: relative;
}
// Prevent the focus on the dropdown toggle when closing dropdowns
.dropdown-toggle:focus {
outline: 0;
}
// The dropdown menu (ul)
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: @zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0; // override default ul
list-style: none;
font-size: @font-size-base;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
background-color: @dropdown-bg;
border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdown-border;
border-radius: @border-radius-base;
.box-shadow(0 6px 12px rgba(0,0,0,.175));
background-clip: padding-box;
// Aligns the dropdown menu to right
//
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
&.pull-right {
right: 0;
left: auto;
}
// Dividers (basically an hr) within the dropdown
.divider {
.nav-divider(@dropdown-divider-bg);
}
// Links within the dropdown menu
> li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: @line-height-base;
color: @dropdown-link-color;
white-space: nowrap; // prevent links from randomly breaking onto new lines
}
}
// Hover/Focus state
.dropdown-menu > li > a {
&:hover,
&:focus {
text-decoration: none;
color: @dropdown-link-hover-color;
background-color: @dropdown-link-hover-bg;
}
}
// Active state
.dropdown-menu > .active > a {
&,
&:hover,
&:focus {
color: @dropdown-link-active-color;
text-decoration: none;
outline: 0;
background-color: @dropdown-link-active-bg;
}
}
// Disabled state
//
// Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a {
&,
&:hover,
&:focus {
color: @dropdown-link-disabled-color;
}
// Nuke hover/focus effects
&:hover,
&:focus {
text-decoration: none;
background-color: transparent;
background-image: none; // Remove CSS gradient
.reset-filter();
cursor: @cursor-disabled;
}
}
// Open state for the dropdown
.open {
// Show the menu
> .dropdown-menu {
display: block;
}
// Remove the outline when :focus is triggered
> a {
outline: 0;
}
}
// Menu positioning
//
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
// menu with the parent.
.dropdown-menu-right {
left: auto; // Reset the default from `.dropdown-menu`
right: 0;
}
// With v3, we enabled auto-flipping if you have a dropdown within a right
// aligned nav component. To enable the undoing of that, we provide an override
// to restore the default dropdown menu alignment.
//
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
// `.pull-right` nav component.
.dropdown-menu-left {
left: 0;
right: auto;
}
// Dropdown section headers
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: @font-size-small;
line-height: @line-height-base;
color: @dropdown-header-color;
white-space: nowrap; // as with > li > a
}
// Backdrop to catch body clicks on mobile, etc.
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: (@zindex-dropdown - 10);
}
// Right aligned dropdowns
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)
//
// Just add .dropup after the standard .dropdown class and you're set, bro.
// TODO: abstract this so that the navbar fixed styles are not placed here?
.dropup,
.navbar-fixed-bottom .dropdown {
// Reverse the caret
.caret {
border-top: 0;
border-bottom: @caret-width-base solid;
content: "";
}
// Different positioning for bottom up menu
.dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 2px;
}
}
// Component alignment
//
// Reiterate per navbar.less and the modified component alignment there.
@media (min-width: @grid-float-breakpoint) {
.navbar-right {
.dropdown-menu {
.dropdown-menu-right();
}
// Necessary for overrides of the default right aligned menu.
// Will remove come v4 in all likelihood.
.dropdown-menu-left {
.dropdown-menu-left();
}
}
}

574
externals/fmt/doc/bootstrap/forms.less vendored Normal file
View File

@ -0,0 +1,574 @@
//
// Forms
// --------------------------------------------------
// Normalize non-controls
//
// Restyle and baseline non-control form elements.
fieldset {
padding: 0;
margin: 0;
border: 0;
// Chrome and Firefox set a `min-width: min-content;` on fieldsets,
// so we reset that to ensure it behaves more like a standard block element.
// See https://github.com/twbs/bootstrap/issues/12359.
min-width: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: @line-height-computed;
font-size: (@font-size-base * 1.5);
line-height: inherit;
color: @legend-color;
border: 0;
border-bottom: 1px solid @legend-border-color;
}
label {
display: inline-block;
max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
margin-bottom: 5px;
font-weight: bold;
}
// Normalize form controls
//
// While most of our form styles require extra classes, some basic normalization
// is required to ensure optimum display with or without those classes to better
// address browser inconsistencies.
// Override content-box in Normalize (* isn't specific enough)
input[type="search"] {
.box-sizing(border-box);
}
// Position radios and checkboxes better
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9; // IE8-9
line-height: normal;
}
// Set the height of file controls to match text inputs
input[type="file"] {
display: block;
}
// Make range inputs behave like textual form controls
input[type="range"] {
display: block;
width: 100%;
}
// Make multiple select elements height not fixed
select[multiple],
select[size] {
height: auto;
}
// Focus for file, radio, and checkbox
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
.tab-focus();
}
// Adjust output element
output {
display: block;
padding-top: (@padding-base-vertical + 1);
font-size: @font-size-base;
line-height: @line-height-base;
color: @input-color;
}
// Common form controls
//
// Shared size and type resets for form controls. Apply `.form-control` to any
// of the following form controls:
//
// select
// textarea
// input[type="text"]
// input[type="password"]
// input[type="datetime"]
// input[type="datetime-local"]
// input[type="date"]
// input[type="month"]
// input[type="time"]
// input[type="week"]
// input[type="number"]
// input[type="email"]
// input[type="url"]
// input[type="search"]
// input[type="tel"]
// input[type="color"]
.form-control {
display: block;
width: 100%;
height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
line-height: @line-height-base;
color: @input-color;
background-color: @input-bg;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid @input-border;
border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
// Customize the `:focus` state to imitate native WebKit styles.
.form-control-focus();
// Placeholder
.placeholder();
// Disabled and read-only inputs
//
// HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&[disabled],
&[readonly],
fieldset[disabled] & {
background-color: @input-bg-disabled;
opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
}
&[disabled],
fieldset[disabled] & {
cursor: @cursor-disabled;
}
// Reset height for `textarea`s
textarea& {
height: auto;
}
}
// Search inputs in iOS
//
// This overrides the extra rounded corners on search inputs in iOS so that our
// `.form-control` class can properly style them. Note that this cannot simply
// be added to `.form-control` as it's not specific enough. For details, see
// https://github.com/twbs/bootstrap/issues/11586.
input[type="search"] {
-webkit-appearance: none;
}
// Special styles for iOS temporal inputs
//
// In Mobile Safari, setting `display: block` on temporal inputs causes the
// text within the input to become vertically misaligned. As a workaround, we
// set a pixel line-height that matches the given height of the input, but only
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: @input-height-base;
&.input-sm,
.input-group-sm & {
line-height: @input-height-small;
}
&.input-lg,
.input-group-lg & {
line-height: @input-height-large;
}
}
}
// Form groups
//
// Designed to help with the organization and spacing of vertical forms. For
// horizontal forms, use the predefined grid classes.
.form-group {
margin-bottom: @form-group-margin-bottom;
}
// Checkboxes and radios
//
// Indent the labels to position radios/checkboxes as hanging controls.
.radio,
.checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
label {
min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-left: -20px;
margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
}
// Radios and checkboxes on same line
.radio-inline,
.checkbox-inline {
position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px; // space out consecutive inline controls
}
// Apply same disabled cursor tweak as for inputs
// Some special care is needed because <label>s don't inherit their parent's `cursor`.
//
// Note: Neither radios nor checkboxes can be readonly.
input[type="radio"],
input[type="checkbox"] {
&[disabled],
&.disabled,
fieldset[disabled] & {
cursor: @cursor-disabled;
}
}
// These classes are used directly on <label>s
.radio-inline,
.checkbox-inline {
&.disabled,
fieldset[disabled] & {
cursor: @cursor-disabled;
}
}
// These classes are used on elements with <label> descendants
.radio,
.checkbox {
&.disabled,
fieldset[disabled] & {
label {
cursor: @cursor-disabled;
}
}
}
// Static form control text
//
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.
.form-control-static {
// Size it appropriately next to real form controls
padding-top: (@padding-base-vertical + 1);
padding-bottom: (@padding-base-vertical + 1);
// Remove default margin from `p`
margin-bottom: 0;
min-height: (@line-height-computed + @font-size-base);
&.input-lg,
&.input-sm {
padding-left: 0;
padding-right: 0;
}
}
// Form control sizing
//
// Build on `.form-control` with modifier classes to decrease or increase the
// height and font-size of form controls.
//
// The `.form-group-* form-control` variations are sadly duplicated to avoid the
// issue documented in https://github.com/twbs/bootstrap/issues/15074.
.input-sm {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-group-sm {
.form-control {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-control-static {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: @line-height-small;
min-height: (@line-height-computed + @font-size-small);
}
}
.input-lg {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-group-lg {
.form-control {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-control-static {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
min-height: (@line-height-computed + @font-size-large);
}
}
// Form control feedback states
//
// Apply contextual and semantic states to individual form controls.
.has-feedback {
// Enable absolute positioning
position: relative;
// Ensure icons don't overlap text
.form-control {
padding-right: (@input-height-base * 1.25);
}
}
// Feedback icon (requires .glyphicon classes)
.form-control-feedback {
position: absolute;
top: 0;
right: 0;
z-index: 2; // Ensure icon is above input groups
display: block;
width: @input-height-base;
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
pointer-events: none;
}
.input-lg + .form-control-feedback {
width: @input-height-large;
height: @input-height-large;
line-height: @input-height-large;
}
.input-sm + .form-control-feedback {
width: @input-height-small;
height: @input-height-small;
line-height: @input-height-small;
}
// Feedback states
.has-success {
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
}
.has-warning {
.form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
}
.has-error {
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
}
// Reposition feedback icon if input has visible label above
.has-feedback label {
& ~ .form-control-feedback {
top: (@line-height-computed + 5); // Height of the `label` and its margin
}
&.sr-only ~ .form-control-feedback {
top: 0;
}
}
// Help text
//
// Apply to any element you wish to create light text for placement immediately
// below a form control. Use for general help, formatting, or instructional text.
.help-block {
display: block; // account for any element using help-block
margin-top: 5px;
margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline {
// Kick in the inline
@media (min-width: @screen-sm-min) {
// Inline-block all the things for "inline"
.form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
// In navbar-form, allow folks to *not* use `.form-group`
.form-control {
display: inline-block;
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}
// Make static controls behave like regular ones
.form-control-static {
display: inline-block;
}
.input-group {
display: inline-table;
vertical-align: middle;
.input-group-addon,
.input-group-btn,
.form-control {
width: auto;
}
}
// Input groups need that 100% width though
.input-group > .form-control {
width: 100%;
}
.control-label {
margin-bottom: 0;
vertical-align: middle;
}
// Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match.
.radio,
.checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
label {
padding-left: 0;
}
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
// Re-override the feedback icon.
.has-feedback .form-control-feedback {
top: 0;
}
}
}
// Horizontal forms
//
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.
.form-horizontal {
// Consistent vertical alignment of radios and checkboxes
//
// Labels also get some reset styles, but that is scoped to a media query below.
.radio,
.checkbox,
.radio-inline,
.checkbox-inline {
margin-top: 0;
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
// Account for padding we're adding to ensure the alignment and of help text
// and other content below items
.radio,
.checkbox {
min-height: (@line-height-computed + (@padding-base-vertical + 1));
}
// Make form groups behave like rows
.form-group {
.make-row();
}
// Reset spacing and right align labels, but scope to media queries so that
// labels on narrow viewports stack the same as a default form example.
@media (min-width: @screen-sm-min) {
.control-label {
text-align: right;
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
}
// Validation states
//
// Reposition the icon because it's now within a grid column and columns have
// `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback {
right: (@grid-gutter-width / 2);
}
// Form group sizes
//
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
// inputs and labels within a `.form-group`.
.form-group-lg {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
}
}
}
.form-group-sm {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: (@padding-small-vertical + 1);
}
}
}
}

View File

@ -0,0 +1,305 @@
//
// Glyphicons for Bootstrap
//
// Since icons are fonts, they can be placed anywhere text is placed and are
// thus automatically sized to match the surrounding child. To use, create an
// inline element with the appropriate classes, like so:
//
// <a href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
// Import the fonts
@font-face {
font-family: 'Glyphicons Halflings';
src: url('@{icon-font-path}@{icon-font-name}.eot');
src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),
url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),
url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),
url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),
url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');
}
// Catchall baseclass
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// Individual icons
.glyphicon-asterisk { &:before { content: "\2a"; } }
.glyphicon-plus { &:before { content: "\2b"; } }
.glyphicon-euro,
.glyphicon-eur { &:before { content: "\20ac"; } }
.glyphicon-minus { &:before { content: "\2212"; } }
.glyphicon-cloud { &:before { content: "\2601"; } }
.glyphicon-envelope { &:before { content: "\2709"; } }
.glyphicon-pencil { &:before { content: "\270f"; } }
.glyphicon-glass { &:before { content: "\e001"; } }
.glyphicon-music { &:before { content: "\e002"; } }
.glyphicon-search { &:before { content: "\e003"; } }
.glyphicon-heart { &:before { content: "\e005"; } }
.glyphicon-star { &:before { content: "\e006"; } }
.glyphicon-star-empty { &:before { content: "\e007"; } }
.glyphicon-user { &:before { content: "\e008"; } }
.glyphicon-film { &:before { content: "\e009"; } }
.glyphicon-th-large { &:before { content: "\e010"; } }
.glyphicon-th { &:before { content: "\e011"; } }
.glyphicon-th-list { &:before { content: "\e012"; } }
.glyphicon-ok { &:before { content: "\e013"; } }
.glyphicon-remove { &:before { content: "\e014"; } }
.glyphicon-zoom-in { &:before { content: "\e015"; } }
.glyphicon-zoom-out { &:before { content: "\e016"; } }
.glyphicon-off { &:before { content: "\e017"; } }
.glyphicon-signal { &:before { content: "\e018"; } }
.glyphicon-cog { &:before { content: "\e019"; } }
.glyphicon-trash { &:before { content: "\e020"; } }
.glyphicon-home { &:before { content: "\e021"; } }
.glyphicon-file { &:before { content: "\e022"; } }
.glyphicon-time { &:before { content: "\e023"; } }
.glyphicon-road { &:before { content: "\e024"; } }
.glyphicon-download-alt { &:before { content: "\e025"; } }
.glyphicon-download { &:before { content: "\e026"; } }
.glyphicon-upload { &:before { content: "\e027"; } }
.glyphicon-inbox { &:before { content: "\e028"; } }
.glyphicon-play-circle { &:before { content: "\e029"; } }
.glyphicon-repeat { &:before { content: "\e030"; } }
.glyphicon-refresh { &:before { content: "\e031"; } }
.glyphicon-list-alt { &:before { content: "\e032"; } }
.glyphicon-lock { &:before { content: "\e033"; } }
.glyphicon-flag { &:before { content: "\e034"; } }
.glyphicon-headphones { &:before { content: "\e035"; } }
.glyphicon-volume-off { &:before { content: "\e036"; } }
.glyphicon-volume-down { &:before { content: "\e037"; } }
.glyphicon-volume-up { &:before { content: "\e038"; } }
.glyphicon-qrcode { &:before { content: "\e039"; } }
.glyphicon-barcode { &:before { content: "\e040"; } }
.glyphicon-tag { &:before { content: "\e041"; } }
.glyphicon-tags { &:before { content: "\e042"; } }
.glyphicon-book { &:before { content: "\e043"; } }
.glyphicon-bookmark { &:before { content: "\e044"; } }
.glyphicon-print { &:before { content: "\e045"; } }
.glyphicon-camera { &:before { content: "\e046"; } }
.glyphicon-font { &:before { content: "\e047"; } }
.glyphicon-bold { &:before { content: "\e048"; } }
.glyphicon-italic { &:before { content: "\e049"; } }
.glyphicon-text-height { &:before { content: "\e050"; } }
.glyphicon-text-width { &:before { content: "\e051"; } }
.glyphicon-align-left { &:before { content: "\e052"; } }
.glyphicon-align-center { &:before { content: "\e053"; } }
.glyphicon-align-right { &:before { content: "\e054"; } }
.glyphicon-align-justify { &:before { content: "\e055"; } }
.glyphicon-list { &:before { content: "\e056"; } }
.glyphicon-indent-left { &:before { content: "\e057"; } }
.glyphicon-indent-right { &:before { content: "\e058"; } }
.glyphicon-facetime-video { &:before { content: "\e059"; } }
.glyphicon-picture { &:before { content: "\e060"; } }
.glyphicon-map-marker { &:before { content: "\e062"; } }
.glyphicon-adjust { &:before { content: "\e063"; } }
.glyphicon-tint { &:before { content: "\e064"; } }
.glyphicon-edit { &:before { content: "\e065"; } }
.glyphicon-share { &:before { content: "\e066"; } }
.glyphicon-check { &:before { content: "\e067"; } }
.glyphicon-move { &:before { content: "\e068"; } }
.glyphicon-step-backward { &:before { content: "\e069"; } }
.glyphicon-fast-backward { &:before { content: "\e070"; } }
.glyphicon-backward { &:before { content: "\e071"; } }
.glyphicon-play { &:before { content: "\e072"; } }
.glyphicon-pause { &:before { content: "\e073"; } }
.glyphicon-stop { &:before { content: "\e074"; } }
.glyphicon-forward { &:before { content: "\e075"; } }
.glyphicon-fast-forward { &:before { content: "\e076"; } }
.glyphicon-step-forward { &:before { content: "\e077"; } }
.glyphicon-eject { &:before { content: "\e078"; } }
.glyphicon-chevron-left { &:before { content: "\e079"; } }
.glyphicon-chevron-right { &:before { content: "\e080"; } }
.glyphicon-plus-sign { &:before { content: "\e081"; } }
.glyphicon-minus-sign { &:before { content: "\e082"; } }
.glyphicon-remove-sign { &:before { content: "\e083"; } }
.glyphicon-ok-sign { &:before { content: "\e084"; } }
.glyphicon-question-sign { &:before { content: "\e085"; } }
.glyphicon-info-sign { &:before { content: "\e086"; } }
.glyphicon-screenshot { &:before { content: "\e087"; } }
.glyphicon-remove-circle { &:before { content: "\e088"; } }
.glyphicon-ok-circle { &:before { content: "\e089"; } }
.glyphicon-ban-circle { &:before { content: "\e090"; } }
.glyphicon-arrow-left { &:before { content: "\e091"; } }
.glyphicon-arrow-right { &:before { content: "\e092"; } }
.glyphicon-arrow-up { &:before { content: "\e093"; } }
.glyphicon-arrow-down { &:before { content: "\e094"; } }
.glyphicon-share-alt { &:before { content: "\e095"; } }
.glyphicon-resize-full { &:before { content: "\e096"; } }
.glyphicon-resize-small { &:before { content: "\e097"; } }
.glyphicon-exclamation-sign { &:before { content: "\e101"; } }
.glyphicon-gift { &:before { content: "\e102"; } }
.glyphicon-leaf { &:before { content: "\e103"; } }
.glyphicon-fire { &:before { content: "\e104"; } }
.glyphicon-eye-open { &:before { content: "\e105"; } }
.glyphicon-eye-close { &:before { content: "\e106"; } }
.glyphicon-warning-sign { &:before { content: "\e107"; } }
.glyphicon-plane { &:before { content: "\e108"; } }
.glyphicon-calendar { &:before { content: "\e109"; } }
.glyphicon-random { &:before { content: "\e110"; } }
.glyphicon-comment { &:before { content: "\e111"; } }
.glyphicon-magnet { &:before { content: "\e112"; } }
.glyphicon-chevron-up { &:before { content: "\e113"; } }
.glyphicon-chevron-down { &:before { content: "\e114"; } }
.glyphicon-retweet { &:before { content: "\e115"; } }
.glyphicon-shopping-cart { &:before { content: "\e116"; } }
.glyphicon-folder-close { &:before { content: "\e117"; } }
.glyphicon-folder-open { &:before { content: "\e118"; } }
.glyphicon-resize-vertical { &:before { content: "\e119"; } }
.glyphicon-resize-horizontal { &:before { content: "\e120"; } }
.glyphicon-hdd { &:before { content: "\e121"; } }
.glyphicon-bullhorn { &:before { content: "\e122"; } }
.glyphicon-bell { &:before { content: "\e123"; } }
.glyphicon-certificate { &:before { content: "\e124"; } }
.glyphicon-thumbs-up { &:before { content: "\e125"; } }
.glyphicon-thumbs-down { &:before { content: "\e126"; } }
.glyphicon-hand-right { &:before { content: "\e127"; } }
.glyphicon-hand-left { &:before { content: "\e128"; } }
.glyphicon-hand-up { &:before { content: "\e129"; } }
.glyphicon-hand-down { &:before { content: "\e130"; } }
.glyphicon-circle-arrow-right { &:before { content: "\e131"; } }
.glyphicon-circle-arrow-left { &:before { content: "\e132"; } }
.glyphicon-circle-arrow-up { &:before { content: "\e133"; } }
.glyphicon-circle-arrow-down { &:before { content: "\e134"; } }
.glyphicon-globe { &:before { content: "\e135"; } }
.glyphicon-wrench { &:before { content: "\e136"; } }
.glyphicon-tasks { &:before { content: "\e137"; } }
.glyphicon-filter { &:before { content: "\e138"; } }
.glyphicon-briefcase { &:before { content: "\e139"; } }
.glyphicon-fullscreen { &:before { content: "\e140"; } }
.glyphicon-dashboard { &:before { content: "\e141"; } }
.glyphicon-paperclip { &:before { content: "\e142"; } }
.glyphicon-heart-empty { &:before { content: "\e143"; } }
.glyphicon-link { &:before { content: "\e144"; } }
.glyphicon-phone { &:before { content: "\e145"; } }
.glyphicon-pushpin { &:before { content: "\e146"; } }
.glyphicon-usd { &:before { content: "\e148"; } }
.glyphicon-gbp { &:before { content: "\e149"; } }
.glyphicon-sort { &:before { content: "\e150"; } }
.glyphicon-sort-by-alphabet { &:before { content: "\e151"; } }
.glyphicon-sort-by-alphabet-alt { &:before { content: "\e152"; } }
.glyphicon-sort-by-order { &:before { content: "\e153"; } }
.glyphicon-sort-by-order-alt { &:before { content: "\e154"; } }
.glyphicon-sort-by-attributes { &:before { content: "\e155"; } }
.glyphicon-sort-by-attributes-alt { &:before { content: "\e156"; } }
.glyphicon-unchecked { &:before { content: "\e157"; } }
.glyphicon-expand { &:before { content: "\e158"; } }
.glyphicon-collapse-down { &:before { content: "\e159"; } }
.glyphicon-collapse-up { &:before { content: "\e160"; } }
.glyphicon-log-in { &:before { content: "\e161"; } }
.glyphicon-flash { &:before { content: "\e162"; } }
.glyphicon-log-out { &:before { content: "\e163"; } }
.glyphicon-new-window { &:before { content: "\e164"; } }
.glyphicon-record { &:before { content: "\e165"; } }
.glyphicon-save { &:before { content: "\e166"; } }
.glyphicon-open { &:before { content: "\e167"; } }
.glyphicon-saved { &:before { content: "\e168"; } }
.glyphicon-import { &:before { content: "\e169"; } }
.glyphicon-export { &:before { content: "\e170"; } }
.glyphicon-send { &:before { content: "\e171"; } }
.glyphicon-floppy-disk { &:before { content: "\e172"; } }
.glyphicon-floppy-saved { &:before { content: "\e173"; } }
.glyphicon-floppy-remove { &:before { content: "\e174"; } }
.glyphicon-floppy-save { &:before { content: "\e175"; } }
.glyphicon-floppy-open { &:before { content: "\e176"; } }
.glyphicon-credit-card { &:before { content: "\e177"; } }
.glyphicon-transfer { &:before { content: "\e178"; } }
.glyphicon-cutlery { &:before { content: "\e179"; } }
.glyphicon-header { &:before { content: "\e180"; } }
.glyphicon-compressed { &:before { content: "\e181"; } }
.glyphicon-earphone { &:before { content: "\e182"; } }
.glyphicon-phone-alt { &:before { content: "\e183"; } }
.glyphicon-tower { &:before { content: "\e184"; } }
.glyphicon-stats { &:before { content: "\e185"; } }
.glyphicon-sd-video { &:before { content: "\e186"; } }
.glyphicon-hd-video { &:before { content: "\e187"; } }
.glyphicon-subtitles { &:before { content: "\e188"; } }
.glyphicon-sound-stereo { &:before { content: "\e189"; } }
.glyphicon-sound-dolby { &:before { content: "\e190"; } }
.glyphicon-sound-5-1 { &:before { content: "\e191"; } }
.glyphicon-sound-6-1 { &:before { content: "\e192"; } }
.glyphicon-sound-7-1 { &:before { content: "\e193"; } }
.glyphicon-copyright-mark { &:before { content: "\e194"; } }
.glyphicon-registration-mark { &:before { content: "\e195"; } }
.glyphicon-cloud-download { &:before { content: "\e197"; } }
.glyphicon-cloud-upload { &:before { content: "\e198"; } }
.glyphicon-tree-conifer { &:before { content: "\e199"; } }
.glyphicon-tree-deciduous { &:before { content: "\e200"; } }
.glyphicon-cd { &:before { content: "\e201"; } }
.glyphicon-save-file { &:before { content: "\e202"; } }
.glyphicon-open-file { &:before { content: "\e203"; } }
.glyphicon-level-up { &:before { content: "\e204"; } }
.glyphicon-copy { &:before { content: "\e205"; } }
.glyphicon-paste { &:before { content: "\e206"; } }
// The following 2 Glyphicons are omitted for the time being because
// they currently use Unicode codepoints that are outside the
// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle
// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.
// Notably, the bug affects some older versions of the Android Browser.
// More info: https://github.com/twbs/bootstrap/issues/10106
// .glyphicon-door { &:before { content: "\1f6aa"; } }
// .glyphicon-key { &:before { content: "\1f511"; } }
.glyphicon-alert { &:before { content: "\e209"; } }
.glyphicon-equalizer { &:before { content: "\e210"; } }
.glyphicon-king { &:before { content: "\e211"; } }
.glyphicon-queen { &:before { content: "\e212"; } }
.glyphicon-pawn { &:before { content: "\e213"; } }
.glyphicon-bishop { &:before { content: "\e214"; } }
.glyphicon-knight { &:before { content: "\e215"; } }
.glyphicon-baby-formula { &:before { content: "\e216"; } }
.glyphicon-tent { &:before { content: "\26fa"; } }
.glyphicon-blackboard { &:before { content: "\e218"; } }
.glyphicon-bed { &:before { content: "\e219"; } }
.glyphicon-apple { &:before { content: "\f8ff"; } }
.glyphicon-erase { &:before { content: "\e221"; } }
.glyphicon-hourglass { &:before { content: "\231b"; } }
.glyphicon-lamp { &:before { content: "\e223"; } }
.glyphicon-duplicate { &:before { content: "\e224"; } }
.glyphicon-piggy-bank { &:before { content: "\e225"; } }
.glyphicon-scissors { &:before { content: "\e226"; } }
.glyphicon-bitcoin { &:before { content: "\e227"; } }
.glyphicon-btc { &:before { content: "\e227"; } }
.glyphicon-xbt { &:before { content: "\e227"; } }
.glyphicon-yen { &:before { content: "\00a5"; } }
.glyphicon-jpy { &:before { content: "\00a5"; } }
.glyphicon-ruble { &:before { content: "\20bd"; } }
.glyphicon-rub { &:before { content: "\20bd"; } }
.glyphicon-scale { &:before { content: "\e230"; } }
.glyphicon-ice-lolly { &:before { content: "\e231"; } }
.glyphicon-ice-lolly-tasted { &:before { content: "\e232"; } }
.glyphicon-education { &:before { content: "\e233"; } }
.glyphicon-option-horizontal { &:before { content: "\e234"; } }
.glyphicon-option-vertical { &:before { content: "\e235"; } }
.glyphicon-menu-hamburger { &:before { content: "\e236"; } }
.glyphicon-modal-window { &:before { content: "\e237"; } }
.glyphicon-oil { &:before { content: "\e238"; } }
.glyphicon-grain { &:before { content: "\e239"; } }
.glyphicon-sunglasses { &:before { content: "\e240"; } }
.glyphicon-text-size { &:before { content: "\e241"; } }
.glyphicon-text-color { &:before { content: "\e242"; } }
.glyphicon-text-background { &:before { content: "\e243"; } }
.glyphicon-object-align-top { &:before { content: "\e244"; } }
.glyphicon-object-align-bottom { &:before { content: "\e245"; } }
.glyphicon-object-align-horizontal{ &:before { content: "\e246"; } }
.glyphicon-object-align-left { &:before { content: "\e247"; } }
.glyphicon-object-align-vertical { &:before { content: "\e248"; } }
.glyphicon-object-align-right { &:before { content: "\e249"; } }
.glyphicon-triangle-right { &:before { content: "\e250"; } }
.glyphicon-triangle-left { &:before { content: "\e251"; } }
.glyphicon-triangle-bottom { &:before { content: "\e252"; } }
.glyphicon-triangle-top { &:before { content: "\e253"; } }
.glyphicon-console { &:before { content: "\e254"; } }
.glyphicon-superscript { &:before { content: "\e255"; } }
.glyphicon-subscript { &:before { content: "\e256"; } }
.glyphicon-menu-left { &:before { content: "\e257"; } }
.glyphicon-menu-right { &:before { content: "\e258"; } }
.glyphicon-menu-down { &:before { content: "\e259"; } }
.glyphicon-menu-up { &:before { content: "\e260"; } }

84
externals/fmt/doc/bootstrap/grid.less vendored Normal file
View File

@ -0,0 +1,84 @@
//
// Grid system
// --------------------------------------------------
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.
.tb-container {
.container-fixed();
@media (min-width: @screen-sm-min) {
width: @container-sm;
}
@media (min-width: @screen-md-min) {
width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: @container-lg;
}
}
// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.
.container-fluid {
.container-fixed();
}
// Row
//
// Rows contain and clear the floats of your columns.
.row {
.make-row();
}
// Columns
//
// Common styles for small and large grid columns
.make-grid-columns();
// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
.make-grid(xs);
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
@media (min-width: @screen-sm-min) {
.make-grid(sm);
}
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
@media (min-width: @screen-md-min) {
.make-grid(md);
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
@media (min-width: @screen-lg-min) {
.make-grid(lg);
}

View File

@ -0,0 +1,166 @@
//
// Input groups
// --------------------------------------------------
// Base styles
// -------------------------
.input-group {
position: relative; // For dropdowns
display: table;
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
// Undo padding and float of grid classes
&[class*="col-"] {
float: none;
padding-left: 0;
padding-right: 0;
}
.form-control {
// Ensure that the input is always above the *appended* addon button for
// proper border colors.
position: relative;
z-index: 2;
// IE9 fubars the placeholder attribute in text inputs and the arrows on
// select elements in input groups. To fix it, we float the input. Details:
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
float: left;
width: 100%;
margin-bottom: 0;
}
}
// Sizing options
//
// Remix the default form control sizing classes into new ones for easier
// manipulation.
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
.input-lg();
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
.input-sm();
}
// Display as table-cell
// -------------------------
.input-group-addon,
.input-group-btn,
.input-group .form-control {
display: table-cell;
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
}
// Addon and addon wrapper for buttons
.input-group-addon,
.input-group-btn {
width: 1%;
white-space: nowrap;
vertical-align: middle; // Match the inputs
}
// Text input groups
// -------------------------
.input-group-addon {
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
font-weight: normal;
line-height: 1;
color: @input-color;
text-align: center;
background-color: @input-group-addon-bg;
border: 1px solid @input-group-addon-border-color;
border-radius: @border-radius-base;
// Sizing
&.input-sm {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
&.input-lg {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
// Nuke default margins from checkboxes and radios to vertically center within.
input[type="radio"],
input[type="checkbox"] {
margin-top: 0;
}
}
// Reset rounded corners
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
.border-right-radius(0);
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
.border-left-radius(0);
}
.input-group-addon:last-child {
border-left: 0;
}
// Button input groups
// -------------------------
.input-group-btn {
position: relative;
// Jankily prevent input button groups from wrapping with `white-space` and
// `font-size` in combination with `inline-block` on buttons.
font-size: 0;
white-space: nowrap;
// Negative margin for spacing, position for bringing hovered/focused/actived
// element above the siblings.
> .btn {
position: relative;
+ .btn {
margin-left: -1px;
}
// Bring the "active" button to the front
&:hover,
&:focus,
&:active {
z-index: 2;
}
}
// Negative margin to only have a 1px border between the two
&:first-child {
> .btn,
> .btn-group {
margin-right: -1px;
}
}
&:last-child {
> .btn,
> .btn-group {
margin-left: -1px;
}
}
}

View File

@ -0,0 +1,50 @@
//
// Jumbotron
// --------------------------------------------------
.jumbotron {
padding: @jumbotron-padding (@jumbotron-padding / 2);
margin-bottom: @jumbotron-padding;
color: @jumbotron-color;
background-color: @jumbotron-bg;
h1,
.h1 {
color: @jumbotron-heading-color;
}
p {
margin-bottom: (@jumbotron-padding / 2);
font-size: @jumbotron-font-size;
font-weight: 200;
}
> hr {
border-top-color: darken(@jumbotron-bg, 10%);
}
.tb-container &,
.container-fluid & {
border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
}
.tb-container {
max-width: 100%;
}
@media screen and (min-width: @screen-sm-min) {
padding: (@jumbotron-padding * 1.6) 0;
.tb-container &,
.container-fluid & {
padding-left: (@jumbotron-padding * 2);
padding-right: (@jumbotron-padding * 2);
}
h1,
.h1 {
font-size: (@font-size-base * 4.5);
}
}
}

64
externals/fmt/doc/bootstrap/labels.less vendored Normal file
View File

@ -0,0 +1,64 @@
//
// Labels
// --------------------------------------------------
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
// Add hover effects, but only for links
a& {
&:hover,
&:focus {
color: @label-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Empty labels collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-default {
.label-variant(@label-default-bg);
}
.label-primary {
.label-variant(@label-primary-bg);
}
.label-success {
.label-variant(@label-success-bg);
}
.label-info {
.label-variant(@label-info-bg);
}
.label-warning {
.label-variant(@label-warning-bg);
}
.label-danger {
.label-variant(@label-danger-bg);
}

View File

@ -0,0 +1,124 @@
//
// List groups
// --------------------------------------------------
// Base class
//
// Easily usable on <ul>, <ol>, or <div>.
.list-group {
// No need to set list-style: none; since .list-group-item is block level
margin-bottom: 20px;
padding-left: 0; // reset padding because ul and ol
}
// Individual list items
//
// Use on `li`s or `div`s within the `.list-group` parent.
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
// Place the border on the list items and negative margin up for better styling
margin-bottom: -1px;
background-color: @list-group-bg;
border: 1px solid @list-group-border;
// Round the first and last items
&:first-child {
.border-top-radius(@list-group-border-radius);
}
&:last-child {
margin-bottom: 0;
.border-bottom-radius(@list-group-border-radius);
}
}
// Linked list items
//
// Use anchor elements instead of `li`s or `div`s to create linked list items.
// Includes an extra `.active` modifier class for showing selected items.
a.list-group-item {
color: @list-group-link-color;
.list-group-item-heading {
color: @list-group-link-heading-color;
}
// Hover state
&:hover,
&:focus {
text-decoration: none;
color: @list-group-link-hover-color;
background-color: @list-group-hover-bg;
}
}
.list-group-item {
// Disabled state
&.disabled,
&.disabled:hover,
&.disabled:focus {
background-color: @list-group-disabled-bg;
color: @list-group-disabled-color;
cursor: @cursor-disabled;
// Force color to inherit for custom content
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: @list-group-disabled-text-color;
}
}
// Active class on item itself, not parent
&.active,
&.active:hover,
&.active:focus {
z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-color;
background-color: @list-group-active-bg;
border-color: @list-group-active-border;
// Force color to inherit for custom content
.list-group-item-heading,
.list-group-item-heading > small,
.list-group-item-heading > .small {
color: inherit;
}
.list-group-item-text {
color: @list-group-active-text-color;
}
}
}
// Contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.
.list-group-item-variant(success; @state-success-bg; @state-success-text);
.list-group-item-variant(info; @state-info-bg; @state-info-text);
.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
// Custom content options
//
// Extra classes for creating well-formatted content within `.list-group-item`s.
.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}

61
externals/fmt/doc/bootstrap/media.less vendored Normal file
View File

@ -0,0 +1,61 @@
.media {
// Proper spacing between instances of .media
margin-top: 15px;
&:first-child {
margin-top: 0;
}
}
.media,
.media-body {
zoom: 1;
overflow: hidden;
}
.media-body {
width: 10000px;
}
.media-object {
display: block;
}
.media-right,
.media > .pull-right {
padding-left: 10px;
}
.media-left,
.media > .pull-left {
padding-right: 10px;
}
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
// Reset margins on headings for tighter default spacing
.media-heading {
margin-top: 0;
margin-bottom: 5px;
}
// Media list variation
//
// Undo default ul/ol styles
.media-list {
padding-left: 0;
list-style: none;
}

39
externals/fmt/doc/bootstrap/mixins.less vendored Normal file
View File

@ -0,0 +1,39 @@
// Mixins
// --------------------------------------------------
// Utilities
@import "mixins/hide-text.less";
@import "mixins/opacity.less";
@import "mixins/image.less";
@import "mixins/labels.less";
@import "mixins/reset-filter.less";
@import "mixins/resize.less";
@import "mixins/responsive-visibility.less";
@import "mixins/size.less";
@import "mixins/tab-focus.less";
@import "mixins/text-emphasis.less";
@import "mixins/text-overflow.less";
@import "mixins/vendor-prefixes.less";
// Components
@import "mixins/alerts.less";
@import "mixins/buttons.less";
@import "mixins/panels.less";
@import "mixins/pagination.less";
@import "mixins/list-group.less";
@import "mixins/nav-divider.less";
@import "mixins/forms.less";
@import "mixins/progress-bar.less";
@import "mixins/table-row.less";
// Skins
@import "mixins/background-variant.less";
@import "mixins/border-radius.less";
@import "mixins/gradients.less";
// Layout
@import "mixins/clearfix.less";
@import "mixins/center-block.less";
@import "mixins/nav-vertical-align.less";
@import "mixins/grid-framework.less";
@import "mixins/grid.less";

View File

@ -0,0 +1,14 @@
// Alerts
.alert-variant(@background; @border; @text-color) {
background-color: @background;
border-color: @border;
color: @text-color;
hr {
border-top-color: darken(@border, 5%);
}
.alert-link {
color: darken(@text-color, 10%);
}
}

View File

@ -0,0 +1,8 @@
// Contextual backgrounds
.bg-variant(@color) {
background-color: @color;
a&:hover {
background-color: darken(@color, 10%);
}
}

View File

@ -0,0 +1,18 @@
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}

View File

@ -0,0 +1,52 @@
// Button variants
//
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
.button-variant(@color; @background; @border) {
color: @color;
background-color: @background;
border-color: @border;
&:hover,
&:focus,
&.focus,
&:active,
&.active,
.open > .dropdown-toggle& {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
}
&:active,
&.active,
.open > .dropdown-toggle& {
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
&,
&:hover,
&:focus,
&.focus,
&:active,
&.active {
background-color: @background;
border-color: @border;
}
}
.badge {
color: @background;
background-color: @color;
}
}
// Button sizes
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
}

View File

@ -0,0 +1,7 @@
// Center-align a block level element
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}

View File

@ -0,0 +1,22 @@
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// contenteditable attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
.clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}

View File

@ -0,0 +1,85 @@
// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.
.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
// Color the label and help text
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label {
color: @text-color;
}
// Set the border and box shadow on specific inputs to match
.form-control {
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
&:focus {
border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow);
}
}
// Set validation states also for addons
.input-group-addon {
color: @text-color;
border-color: @border-color;
background-color: @background-color;
}
// Optional feedback icon
.form-control-feedback {
color: @text-color;
}
}
// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `@input-border-focus` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.
.form-control-focus(@color: @input-border-focus) {
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
&:focus {
border-color: @color;
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
height: @input-height;
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
select& {
height: @input-height;
line-height: @input-height;
}
textarea&,
select[multiple]& {
height: auto;
}
}

View File

@ -0,0 +1,59 @@
// Gradients
#gradient {
// Horizontal gradient, from left to right
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
}
// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
}
.directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
background-repeat: repeat-x;
background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
}
.horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.radial(@inner-color: #555; @outer-color: #333) {
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
background-image: radial-gradient(circle, @inner-color, @outer-color);
background-repeat: no-repeat;
}
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
}
}

View File

@ -0,0 +1,91 @@
// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.
.make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) { // initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
.col(1); // kickstart it
}
.float-grid-columns(@class) {
.col(@index) { // initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".col-@{class}-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
float: left;
}
}
.col(1); // kickstart it
}
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.col-@{class}-push-@{index} {
left: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.col-@{class}-push-0 {
left: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.col-@{class}-pull-@{index} {
right: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.col-@{class}-pull-0 {
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = offset) {
.col-@{class}-offset-@{index} {
margin-left: percentage((@index / @grid-columns));
}
}
// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
}
// Create grid for specific class
.make-grid(@class) {
.float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width);
.loop-grid-columns(@grid-columns, @class, pull);
.loop-grid-columns(@grid-columns, @class, push);
.loop-grid-columns(@grid-columns, @class, offset);
}

View File

@ -0,0 +1,122 @@
// Grid system
//
// Generate semantic grid columns with these mixins.
// Centered container element
.container-fixed(@gutter: @grid-gutter-width) {
margin-right: auto;
margin-left: auto;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
&:extend(.clearfix all);
}
// Creates a wrapper for a series of columns
.make-row(@gutter: @grid-gutter-width) {
margin-left: (@gutter / -2);
margin-right: (@gutter / -2);
&:extend(.clearfix all);
}
// Generate the extra small columns
.make-xs-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
float: left;
width: percentage((@columns / @grid-columns));
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
}
.make-xs-column-offset(@columns) {
margin-left: percentage((@columns / @grid-columns));
}
.make-xs-column-push(@columns) {
left: percentage((@columns / @grid-columns));
}
.make-xs-column-pull(@columns) {
right: percentage((@columns / @grid-columns));
}
// Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-sm-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-sm-column-offset(@columns) {
@media (min-width: @screen-sm-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-push(@columns) {
@media (min-width: @screen-sm-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-pull(@columns) {
@media (min-width: @screen-sm-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-md-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-md-column-offset(@columns) {
@media (min-width: @screen-md-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-md-column-push(@columns) {
@media (min-width: @screen-md-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-md-column-pull(@columns) {
@media (min-width: @screen-md-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-lg-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-lg-column-offset(@columns) {
@media (min-width: @screen-lg-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-push(@columns) {
@media (min-width: @screen-lg-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-pull(@columns) {
@media (min-width: @screen-lg-min) {
right: percentage((@columns / @grid-columns));
}
}

View File

@ -0,0 +1,21 @@
// CSS image replacement
//
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
// mixins being reused as classes with the same name, this doesn't hold up. As
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
//
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
// Deprecated as of v3.0.1 (will be removed in v4)
.hide-text() {
font: ~"0/0" a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
// New mixin to use as of v3.0.1
.text-hide() {
.hide-text();
}

View File

@ -0,0 +1,33 @@
// Image Mixins
// - Responsive image
// - Retina image
// Responsive image
//
// Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) {
display: @display;
max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}
// Retina image
//
// Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
background-image: url("@{file-2x}");
background-size: @width-1x @height-1x;
}
}

View File

@ -0,0 +1,12 @@
// Labels
.label-variant(@color) {
background-color: @color;
&[href] {
&:hover,
&:focus {
background-color: darken(@color, 10%);
}
}
}

View File

@ -0,0 +1,29 @@
// List Groups
.list-group-item-variant(@state; @background; @color) {
.list-group-item-@{state} {
color: @color;
background-color: @background;
a& {
color: @color;
.list-group-item-heading {
color: inherit;
}
&:hover,
&:focus {
color: @color;
background-color: darken(@background, 5%);
}
&.active,
&.active:hover,
&.active:focus {
color: #fff;
background-color: @color;
border-color: @color;
}
}
}
}

View File

@ -0,0 +1,10 @@
// Horizontal dividers
//
// Dividers (basically an hr) within dropdowns and nav lists
.nav-divider(@color: #e5e5e5) {
height: 1px;
margin: ((@line-height-computed / 2) - 1) 0;
overflow: hidden;
background-color: @color;
}

View File

@ -0,0 +1,9 @@
// Navbar vertical align
//
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
.navbar-vertical-align(@element-height) {
margin-top: ((@navbar-height - @element-height) / 2);
margin-bottom: ((@navbar-height - @element-height) / 2);
}

View File

@ -0,0 +1,8 @@
// Opacity
.opacity(@opacity) {
opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})";
}

View File

@ -0,0 +1,23 @@
// Pagination
.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
> li {
> a,
> span {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius);
}
}
}
}

View File

@ -0,0 +1,24 @@
// Panels
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
border-color: @border;
& > .panel-heading {
color: @heading-text-color;
background-color: @heading-bg-color;
border-color: @heading-border;
+ .panel-collapse > .panel-body {
border-top-color: @border;
}
.badge {
color: @heading-bg-color;
background-color: @heading-text-color;
}
}
& > .panel-footer {
+ .panel-collapse > .panel-body {
border-bottom-color: @border;
}
}
}

View File

@ -0,0 +1,10 @@
// Progress bars
.progress-bar-variant(@color) {
background-color: @color;
// Deprecated parent class requirement as of v3.2.0
.progress-striped & {
#gradient > .striped();
}
}

View File

@ -0,0 +1,8 @@
// Reset filters for IE
//
// When you need to remove a gradient background, do not forget to use this to reset
// the IE filter for IE9 and below.
.reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}

View File

@ -0,0 +1,6 @@
// Resize anything
.resizable(@direction) {
resize: @direction; // Options: horizontal, vertical, both
overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
}

View File

@ -0,0 +1,15 @@
// Responsive utilities
//
// More easily include all the states for responsive-utilities.less.
.responsive-visibility() {
display: block !important;
table& { display: table; }
tr& { display: table-row !important; }
th&,
td& { display: table-cell !important; }
}
.responsive-invisibility() {
display: none !important;
}

View File

@ -0,0 +1,10 @@
// Sizing shortcuts
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}

View File

@ -0,0 +1,9 @@
// WebKit-style focus
.tab-focus() {
// Default
outline: thin dotted;
// WebKit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}

View File

@ -0,0 +1,28 @@
// Tables
.table-row-variant(@state; @background) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
> td.@{state},
> th.@{state},
&.@{state} > td,
&.@{state} > th {
background-color: @background;
}
}
// Hover states for `.table-hover`
// Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody > tr {
> td.@{state}:hover,
> th.@{state}:hover,
&.@{state}:hover > td,
&:hover > .@{state},
&.@{state}:hover > th {
background-color: darken(@background, 5%);
}
}
}

View File

@ -0,0 +1,8 @@
// Typography
.text-emphasis-variant(@color) {
color: @color;
a&:hover {
color: darken(@color, 10%);
}
}

View File

@ -0,0 +1,8 @@
// Text overflow
// Requires inline-block or block for proper styling
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@ -0,0 +1,227 @@
// Vendor Prefixes
//
// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They will be removed in v4.
// - Animations
// - Backface visibility
// - Box shadow
// - Box sizing
// - Content columns
// - Hyphens
// - Placeholder text
// - Transformations
// - Transitions
// - User Select
// Animations
.animation(@animation) {
-webkit-animation: @animation;
-o-animation: @animation;
animation: @animation;
}
.animation-name(@name) {
-webkit-animation-name: @name;
animation-name: @name;
}
.animation-duration(@duration) {
-webkit-animation-duration: @duration;
animation-duration: @duration;
}
.animation-timing-function(@timing-function) {
-webkit-animation-timing-function: @timing-function;
animation-timing-function: @timing-function;
}
.animation-delay(@delay) {
-webkit-animation-delay: @delay;
animation-delay: @delay;
}
.animation-iteration-count(@iteration-count) {
-webkit-animation-iteration-count: @iteration-count;
animation-iteration-count: @iteration-count;
}
.animation-direction(@direction) {
-webkit-animation-direction: @direction;
animation-direction: @direction;
}
.animation-fill-mode(@fill-mode) {
-webkit-animation-fill-mode: @fill-mode;
animation-fill-mode: @fill-mode;
}
// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
.backface-visibility(@visibility){
-webkit-backface-visibility: @visibility;
-moz-backface-visibility: @visibility;
backface-visibility: @visibility;
}
// Drop shadows
//
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
// supported browsers that have box shadow capabilities now support it.
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
// Box sizing
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
-moz-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
// CSS3 Content Columns
.content-columns(@column-count; @column-gap: @grid-gutter-width) {
-webkit-column-count: @column-count;
-moz-column-count: @column-count;
column-count: @column-count;
-webkit-column-gap: @column-gap;
-moz-column-gap: @column-gap;
column-gap: @column-gap;
}
// Optional hyphenation
.hyphens(@mode: auto) {
word-wrap: break-word;
-webkit-hyphens: @mode;
-moz-hyphens: @mode;
-ms-hyphens: @mode; // IE10+
-o-hyphens: @mode;
hyphens: @mode;
}
// Placeholder text
.placeholder(@color: @input-color-placeholder) {
// Firefox
&::-moz-placeholder {
color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome
}
// Transformations
.scale(@ratio) {
-webkit-transform: scale(@ratio);
-ms-transform: scale(@ratio); // IE9 only
-o-transform: scale(@ratio);
transform: scale(@ratio);
}
.scale(@ratioX; @ratioY) {
-webkit-transform: scale(@ratioX, @ratioY);
-ms-transform: scale(@ratioX, @ratioY); // IE9 only
-o-transform: scale(@ratioX, @ratioY);
transform: scale(@ratioX, @ratioY);
}
.scaleX(@ratio) {
-webkit-transform: scaleX(@ratio);
-ms-transform: scaleX(@ratio); // IE9 only
-o-transform: scaleX(@ratio);
transform: scaleX(@ratio);
}
.scaleY(@ratio) {
-webkit-transform: scaleY(@ratio);
-ms-transform: scaleY(@ratio); // IE9 only
-o-transform: scaleY(@ratio);
transform: scaleY(@ratio);
}
.skew(@x; @y) {
-webkit-transform: skewX(@x) skewY(@y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
-o-transform: skewX(@x) skewY(@y);
transform: skewX(@x) skewY(@y);
}
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y); // IE9 only
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
.translate3d(@x; @y; @z) {
-webkit-transform: translate3d(@x, @y, @z);
transform: translate3d(@x, @y, @z);
}
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); // IE9 only
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.rotateX(@degrees) {
-webkit-transform: rotateX(@degrees);
-ms-transform: rotateX(@degrees); // IE9 only
-o-transform: rotateX(@degrees);
transform: rotateX(@degrees);
}
.rotateY(@degrees) {
-webkit-transform: rotateY(@degrees);
-ms-transform: rotateY(@degrees); // IE9 only
-o-transform: rotateY(@degrees);
transform: rotateY(@degrees);
}
.perspective(@perspective) {
-webkit-perspective: @perspective;
-moz-perspective: @perspective;
perspective: @perspective;
}
.perspective-origin(@perspective) {
-webkit-perspective-origin: @perspective;
-moz-perspective-origin: @perspective;
perspective-origin: @perspective;
}
.transform-origin(@origin) {
-webkit-transform-origin: @origin;
-moz-transform-origin: @origin;
-ms-transform-origin: @origin; // IE9 only
transform-origin: @origin;
}
// Transitions
.transition(@transition) {
-webkit-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
.transition-property(@transition-property) {
-webkit-transition-property: @transition-property;
transition-property: @transition-property;
}
.transition-delay(@transition-delay) {
-webkit-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
.transition-duration(@transition-duration) {
-webkit-transition-duration: @transition-duration;
transition-duration: @transition-duration;
}
.transition-timing-function(@timing-function) {
-webkit-transition-timing-function: @timing-function;
transition-timing-function: @timing-function;
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}
// User select
// For selecting text on the page
.user-select(@select) {
-webkit-user-select: @select;
-moz-user-select: @select;
-ms-user-select: @select; // IE10+
user-select: @select;
}

150
externals/fmt/doc/bootstrap/modals.less vendored Normal file
View File

@ -0,0 +1,150 @@
//
// Modals
// --------------------------------------------------
// .modal-open - body class for killing the scroll
// .modal - container to scroll within
// .modal-dialog - positioning shell for the actual modal
// .modal-content - actual modal w/ bg and corners and shit
// Kill the scroll on the body
.modal-open {
overflow: hidden;
}
// Container that the modal scrolls within
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: @zindex-modal;
-webkit-overflow-scrolling: touch;
// Prevent Chrome on Windows from adding a focus outline. For details, see
// https://github.com/twbs/bootstrap/pull/10951.
outline: 0;
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
.translate(0, -25%);
.transition-transform(~"0.3s ease-out");
}
&.in .modal-dialog { .translate(0, 0) }
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
// Actual modal
.modal-content {
position: relative;
background-color: @modal-content-bg;
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large;
.box-shadow(0 3px 9px rgba(0,0,0,.5));
background-clip: padding-box;
// Remove focus outline from opened modal
outline: 0;
}
// Modal background
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: @zindex-modal-background;
background-color: @modal-backdrop-bg;
// Fade for backdrop
&.fade { .opacity(0); }
&.in { .opacity(@modal-backdrop-opacity); }
}
// Modal header
// Top section of the modal w/ title and dismiss
.modal-header {
padding: @modal-title-padding;
border-bottom: 1px solid @modal-header-border-color;
min-height: (@modal-title-padding + @modal-title-line-height);
}
// Close icon
.modal-header .close {
margin-top: -2px;
}
// Title text within header
.modal-title {
margin: 0;
line-height: @modal-title-line-height;
}
// Modal body
// Where all modal content resides (sibling of .modal-header and .modal-footer)
.modal-body {
position: relative;
padding: @modal-inner-padding;
}
// Footer (for actions)
.modal-footer {
padding: @modal-inner-padding;
text-align: right; // right align buttons
border-top: 1px solid @modal-footer-border-color;
&:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
.btn + .btn {
margin-left: 5px;
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
}
// but override that for button groups
.btn-group .btn + .btn {
margin-left: -1px;
}
// and override it for block buttons as well
.btn-block + .btn-block {
margin-left: 0;
}
}
// Measure scrollbar width for padding body during modal show/hide
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
// Scale up the modal
@media (min-width: @screen-sm-min) {
// Automatically set modal's width for larger viewports
.modal-dialog {
width: @modal-md;
margin: 30px auto;
}
.modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5));
}
// Modal sizes
.modal-sm { width: @modal-sm; }
}
@media (min-width: @screen-md-min) {
.modal-lg { width: @modal-lg; }
}

660
externals/fmt/doc/bootstrap/navbar.less vendored Normal file
View File

@ -0,0 +1,660 @@
//
// Navbars
// --------------------------------------------------
// Wrapper and base class
//
// Provide a static navbar from which we expand to create full-width, fixed, and
// other navbar variations.
.navbar {
position: relative;
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
margin-bottom: @navbar-margin-bottom;
border: 1px solid transparent;
// Prevent floats from breaking the navbar
&:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius;
}
}
// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.
.navbar-header {
&:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
float: left;
}
}
// Navbar collapse (body)
//
// Group your navbar content into this for easy collapsing and expanding across
// various device sizes. By default, this content is collapsed when <768px, but
// will expand past that for a horizontal display.
//
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
// vertically and include a `max-height` to overflow in case you have too much
// content for the user's viewport.
.navbar-collapse {
overflow-x: visible;
padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal;
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
&:extend(.clearfix all);
-webkit-overflow-scrolling: touch;
&.in {
overflow-y: auto;
}
@media (min-width: @grid-float-breakpoint) {
width: auto;
border-top: 0;
box-shadow: none;
&.collapse {
display: block !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
}
&.in {
overflow-y: visible;
}
// Undo the collapse side padding for navbars with containers to ensure
// alignment of right-aligned contents.
.navbar-fixed-top &,
.navbar-static-top &,
.navbar-fixed-bottom & {
padding-left: 0;
padding-right: 0;
}
}
}
.navbar-fixed-top,
.navbar-fixed-bottom {
.navbar-collapse {
max-height: @navbar-collapse-max-height;
@media (max-device-width: @screen-xs-min) and (orientation: landscape) {
max-height: 200px;
}
}
}
// Both navbar header and collapse
//
// When a container is present, change the behavior of the header and collapse.
.tb-container,
.container-fluid {
> .navbar-header,
> .navbar-collapse {
margin-right: -@navbar-padding-horizontal;
margin-left: -@navbar-padding-horizontal;
@media (min-width: @grid-float-breakpoint) {
margin-right: 0;
margin-left: 0;
}
}
}
//
// Navbar alignment options
//
// Display the navbar across the entirety of the page or fixed it to the top or
// bottom of the page.
// Static top (unfixed, but 100% wide) navbar
.navbar-static-top {
z-index: @zindex-navbar;
border-width: 0 0 1px;
@media (min-width: @grid-float-breakpoint) {
border-radius: 0;
}
}
// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: @zindex-navbar-fixed;
// Undo the rounded corners
@media (min-width: @grid-float-breakpoint) {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0; // override .navbar defaults
border-width: 1px 0 0;
}
// Brand/project name
.navbar-brand {
float: left;
padding: @navbar-padding-vertical @navbar-padding-horizontal;
font-size: @font-size-large;
line-height: @line-height-computed;
height: @navbar-height;
&:hover,
&:focus {
text-decoration: none;
}
> img {
display: block;
}
@media (min-width: @grid-float-breakpoint) {
.navbar > .tb-container &,
.navbar > .container-fluid & {
margin-left: -@navbar-padding-horizontal;
}
}
}
// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.
.navbar-toggle {
position: relative;
float: right;
margin-right: @navbar-padding-horizontal;
padding: 9px 10px;
.navbar-vertical-align(34px);
background-color: transparent;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
border-radius: @border-radius-base;
// We remove the `outline` here, but later compensate by attaching `:hover`
// styles to `:focus`.
&:focus {
outline: 0;
}
// Bars
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
}
.icon-bar + .icon-bar {
margin-top: 4px;
}
@media (min-width: @grid-float-breakpoint) {
display: none;
}
}
// Navbar nav links
//
// Builds on top of the `.nav` components with its own modifier class to make
// the nav the full height of the horizontal nav (above 768px).
.navbar-nav {
margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
> li > a {
padding-top: 10px;
padding-bottom: 10px;
line-height: @line-height-computed;
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display when collapsed
.open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
box-shadow: none;
> li > a,
.dropdown-header {
padding: 5px 15px 5px 25px;
}
> li > a {
line-height: @line-height-computed;
&:hover,
&:focus {
background-image: none;
}
}
}
}
// Uncollapse the nav
@media (min-width: @grid-float-breakpoint) {
float: left;
margin: 0;
> li {
float: left;
> a {
padding-top: @navbar-padding-vertical;
padding-bottom: @navbar-padding-vertical;
}
}
}
}
// Navbar form
//
// Extension of the `.form-inline` with some extra flavor for optimum display in
// our navbars.
.navbar-form {
margin-left: -@navbar-padding-horizontal;
margin-right: -@navbar-padding-horizontal;
padding: 10px @navbar-padding-horizontal;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow);
// Mixin behavior for optimum display
.form-inline();
.form-group {
@media (max-width: @grid-float-breakpoint-max) {
margin-bottom: 5px;
&:last-child {
margin-bottom: 0;
}
}
}
// Vertically center in expanded, horizontal navbar
.navbar-vertical-align(@input-height-base);
// Undo 100% width for pull classes
@media (min-width: @grid-float-breakpoint) {
width: auto;
border: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
.box-shadow(none);
}
}
// Dropdown menus
// Menu position and menu carets
.navbar-nav > li > .dropdown-menu {
margin-top: 0;
.border-top-radius(0);
}
// Menu position and menu caret support for dropups via extra dropup class
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
margin-bottom: 0;
.border-top-radius(@navbar-border-radius);
.border-bottom-radius(0);
}
// Buttons in navbars
//
// Vertically center a button within a navbar (when *not* in a form).
.navbar-btn {
.navbar-vertical-align(@input-height-base);
&.btn-sm {
.navbar-vertical-align(@input-height-small);
}
&.btn-xs {
.navbar-vertical-align(22);
}
}
// Text in navbars
//
// Add a class to make any element properly align itself vertically within the navbars.
.navbar-text {
.navbar-vertical-align(@line-height-computed);
@media (min-width: @grid-float-breakpoint) {
float: left;
margin-left: @navbar-padding-horizontal;
margin-right: @navbar-padding-horizontal;
}
}
// Component alignment
//
// Repurpose the pull utilities as their own navbar utilities to avoid specificity
// issues with parents and chaining. Only do this when the navbar is uncollapsed
// though so that navbar contents properly stack and align in mobile.
//
// Declared after the navbar components to ensure more specificity on the margins.
@media (min-width: @grid-float-breakpoint) {
.navbar-left { .pull-left(); }
.navbar-right {
.pull-right();
margin-right: -@navbar-padding-horizontal;
~ .navbar-right {
margin-right: 0;
}
}
}
// Alternate navbars
// --------------------------------------------------
// Default navbar
.navbar-default {
background-color: @navbar-default-bg;
border-color: @navbar-default-border;
.navbar-brand {
color: @navbar-default-brand-color;
&:hover,
&:focus {
color: @navbar-default-brand-hover-color;
background-color: @navbar-default-brand-hover-bg;
}
}
.navbar-text {
color: @navbar-default-color;
}
.navbar-nav {
> li > a {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
background-color: @navbar-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
background-color: @navbar-default-link-disabled-bg;
}
}
}
.navbar-toggle {
border-color: @navbar-default-toggle-border-color;
&:hover,
&:focus {
background-color: @navbar-default-toggle-hover-bg;
}
.icon-bar {
background-color: @navbar-default-toggle-icon-bar-bg;
}
}
.navbar-collapse,
.navbar-form {
border-color: @navbar-default-border;
}
// Dropdown menu items
.navbar-nav {
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: @navbar-default-link-active-bg;
color: @navbar-default-link-active-color;
}
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display when collapsed
.open .dropdown-menu {
> li > a {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
background-color: @navbar-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
background-color: @navbar-default-link-disabled-bg;
}
}
}
}
}
// Links in navbars
//
// Add a class to ensure links outside the navbar nav are colored correctly.
.navbar-link {
color: @navbar-default-link-color;
&:hover {
color: @navbar-default-link-hover-color;
}
}
.btn-link {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
}
}
}
}
// Inverse navbar
.navbar-inverse {
background-color: @navbar-inverse-bg;
border-color: @navbar-inverse-border;
.navbar-brand {
color: @navbar-inverse-brand-color;
&:hover,
&:focus {
color: @navbar-inverse-brand-hover-color;
background-color: @navbar-inverse-brand-hover-bg;
}
}
.navbar-text {
color: @navbar-inverse-color;
}
.navbar-nav {
> li > a {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
background-color: @navbar-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-active-color;
background-color: @navbar-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
background-color: @navbar-inverse-link-disabled-bg;
}
}
}
// Darken the responsive nav toggle
.navbar-toggle {
border-color: @navbar-inverse-toggle-border-color;
&:hover,
&:focus {
background-color: @navbar-inverse-toggle-hover-bg;
}
.icon-bar {
background-color: @navbar-inverse-toggle-icon-bar-bg;
}
}
.navbar-collapse,
.navbar-form {
border-color: darken(@navbar-inverse-bg, 7%);
}
// Dropdowns
.navbar-nav {
> .open > a {
&,
&:hover,
&:focus {
background-color: @navbar-inverse-link-active-bg;
color: @navbar-inverse-link-active-color;
}
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display
.open .dropdown-menu {
> .dropdown-header {
border-color: @navbar-inverse-border;
}
.divider {
background-color: @navbar-inverse-border;
}
> li > a {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
background-color: @navbar-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-active-color;
background-color: @navbar-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
background-color: @navbar-inverse-link-disabled-bg;
}
}
}
}
}
.navbar-link {
color: @navbar-inverse-link-color;
&:hover {
color: @navbar-inverse-link-hover-color;
}
}
.btn-link {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
}
}
}
}

242
externals/fmt/doc/bootstrap/navs.less vendored Normal file
View File

@ -0,0 +1,242 @@
//
// Navs
// --------------------------------------------------
// Base class
// --------------------------------------------------
.nav {
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
&:extend(.clearfix all);
> li {
position: relative;
display: block;
> a {
position: relative;
display: block;
padding: @nav-link-padding;
&:hover,
&:focus {
text-decoration: none;
background-color: @nav-link-hover-bg;
}
}
// Disabled state sets text to gray and nukes hover/tab effects
&.disabled > a {
color: @nav-disabled-link-color;
&:hover,
&:focus {
color: @nav-disabled-link-hover-color;
text-decoration: none;
background-color: transparent;
cursor: @cursor-disabled;
}
}
}
// Open dropdowns
.open > a {
&,
&:hover,
&:focus {
background-color: @nav-link-hover-bg;
border-color: @link-color;
}
}
// Nav dividers (deprecated with v3.0.1)
//
// This should have been removed in v3 with the dropping of `.nav-list`, but
// we missed it. We don't currently support this anywhere, but in the interest
// of maintaining backward compatibility in case you use it, it's deprecated.
.nav-divider {
.nav-divider();
}
// Prevent IE8 from misplacing imgs
//
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
> li > a > img {
max-width: none;
}
}
// Tabs
// -------------------------
// Give the tabs something to sit on
.nav-tabs {
border-bottom: 1px solid @nav-tabs-border-color;
> li {
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
// Actual tabs (as links)
> a {
margin-right: 2px;
line-height: @line-height-base;
border: 1px solid transparent;
border-radius: @border-radius-base @border-radius-base 0 0;
&:hover {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
}
}
// Active state, and its :hover to override normal :hover
&.active > a {
&,
&:hover,
&:focus {
color: @nav-tabs-active-link-hover-color;
background-color: @nav-tabs-active-link-hover-bg;
border: 1px solid @nav-tabs-active-link-hover-border-color;
border-bottom-color: transparent;
cursor: default;
}
}
}
// pulling this in mainly for less shorthand
&.nav-justified {
.nav-justified();
.nav-tabs-justified();
}
}
// Pills
// -------------------------
.nav-pills {
> li {
float: left;
// Links rendered as pills
> a {
border-radius: @nav-pills-border-radius;
}
+ li {
margin-left: 2px;
}
// Active state
&.active > a {
&,
&:hover,
&:focus {
color: @nav-pills-active-link-hover-color;
background-color: @nav-pills-active-link-hover-bg;
}
}
}
}
// Stacked pills
.nav-stacked {
> li {
float: none;
+ li {
margin-top: 2px;
margin-left: 0; // no need for this gap between nav items
}
}
}
// Nav variations
// --------------------------------------------------
// Justified nav links
// -------------------------
.nav-justified {
width: 100%;
> li {
float: none;
> a {
text-align: center;
margin-bottom: 5px;
}
}
> .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: @screen-sm-min) {
> li {
display: table-cell;
width: 1%;
> a {
margin-bottom: 0;
}
}
}
}
// Move borders to anchors instead of bottom of list
//
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
.nav-tabs-justified {
border-bottom: 0;
> li > a {
// Override margin from .nav-tabs
margin-right: 0;
border-radius: @border-radius-base;
}
> .active > a,
> .active > a:hover,
> .active > a:focus {
border: 1px solid @nav-tabs-justified-link-border-color;
}
@media (min-width: @screen-sm-min) {
> li > a {
border-bottom: 1px solid @nav-tabs-justified-link-border-color;
border-radius: @border-radius-base @border-radius-base 0 0;
}
> .active > a,
> .active > a:hover,
> .active > a:focus {
border-bottom-color: @nav-tabs-justified-active-link-border-color;
}
}
}
// Tabbable tabs
// -------------------------
// Hide tabbable panes to start, show them when `.active`
.tab-content {
> .tab-pane {
display: none;
}
> .active {
display: block;
}
}
// Dropdowns
// -------------------------
// Specific dropdowns
.nav-tabs .dropdown-menu {
// make dropdown border overlap tab border
margin-top: -1px;
// Remove the top rounded corners here since there is a hard edge above the menu
.border-top-radius(0);
}

View File

@ -0,0 +1,427 @@
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
//
// 1. Set default font family to sans-serif.
// 2. Prevent iOS text size adjust after orientation change, without disabling
// user zoom.
//
html {
font-family: sans-serif; // 1
-ms-text-size-adjust: 100%; // 2
-webkit-text-size-adjust: 100%; // 2
}
//
// Remove default margin.
//
body {
margin: 0;
}
// HTML5 display definitions
// ==========================================================================
//
// Correct `block` display not defined for any HTML5 element in IE 8/9.
// Correct `block` display not defined for `details` or `summary` in IE 10/11
// and Firefox.
// Correct `block` display not defined for `main` in IE 11.
//
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
//
// 1. Correct `inline-block` display not defined in IE 8/9.
// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
//
audio,
canvas,
progress,
video {
display: inline-block; // 1
vertical-align: baseline; // 2
}
//
// Prevent modern browsers from displaying `audio` without controls.
// Remove excess height in iOS 5 devices.
//
audio:not([controls]) {
display: none;
height: 0;
}
//
// Address `[hidden]` styling not present in IE 8/9/10.
// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
//
[hidden],
template {
display: none;
}
// Links
// ==========================================================================
//
// Remove the gray background color from active links in IE 10.
//
a {
background-color: transparent;
}
//
// Improve readability when focused and also mouse hovered in all browsers.
//
a:active,
a:hover {
outline: 0;
}
// Text-level semantics
// ==========================================================================
//
// Address styling not present in IE 8/9/10/11, Safari, and Chrome.
//
abbr[title] {
border-bottom: 1px dotted;
}
//
// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
//
b,
strong {
font-weight: bold;
}
//
// Address styling not present in Safari and Chrome.
//
dfn {
font-style: italic;
}
//
// Address variable `h1` font-size and margin within `section` and `article`
// contexts in Firefox 4+, Safari, and Chrome.
//
h1 {
font-size: 2em;
margin: 0.67em 0;
}
//
// Address styling not present in IE 8/9.
//
mark {
background: #ff0;
color: #000;
}
//
// Address inconsistent and variable font size in all browsers.
//
small {
font-size: 80%;
}
//
// Prevent `sub` and `sup` affecting `line-height` in all browsers.
//
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
// Embedded content
// ==========================================================================
//
// Remove border when inside `a` element in IE 8/9/10.
//
img {
border: 0;
}
//
// Correct overflow not hidden in IE 9/10/11.
//
svg:not(:root) {
overflow: hidden;
}
// Grouping content
// ==========================================================================
//
// Address margin not present in IE 8/9 and Safari.
//
figure {
margin: 1em 40px;
}
//
// Address differences between Firefox and other browsers.
//
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
//
// Contain overflow in all browsers.
//
pre {
overflow: auto;
}
//
// Address odd `em`-unit font size rendering in all browsers.
//
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
// Forms
// ==========================================================================
//
// Known limitation: by default, Chrome and Safari on OS X allow very limited
// styling of `select`, unless a `border` property is set.
//
//
// 1. Correct color not being inherited.
// Known issue: affects color of disabled elements.
// 2. Correct font properties not being inherited.
// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
//
button,
input,
optgroup,
select,
textarea {
color: inherit; // 1
font: inherit; // 2
margin: 0; // 3
}
//
// Address `overflow` set to `hidden` in IE 8/9/10/11.
//
button {
overflow: visible;
}
//
// Address inconsistent `text-transform` inheritance for `button` and `select`.
// All other form control elements do not inherit `text-transform` values.
// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
// Correct `select` style inheritance in Firefox.
//
button,
select {
text-transform: none;
}
//
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
// and `video` controls.
// 2. Correct inability to style clickable `input` types in iOS.
// 3. Improve usability and consistency of cursor style between image-type
// `input` and others.
//
button,
html input[type="button"], // 1
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
}
//
// Re-set default cursor for disabled elements.
//
button[disabled],
html input[disabled] {
cursor: default;
}
//
// Remove inner padding and border in Firefox 4+.
//
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
//
// Address Firefox 4+ setting `line-height` on `input` using `!important` in
// the UA stylesheet.
//
input {
line-height: normal;
}
//
// It's recommended that you don't attempt to style these elements.
// Firefox's implementation doesn't respect box-sizing, padding, or width.
//
// 1. Address box sizing set to `content-box` in IE 8/9/10.
// 2. Remove excess padding in IE 8/9/10.
//
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
}
//
// Fix the cursor style for Chrome's increment/decrement buttons. For certain
// `font-size` values of the `input`, it causes the cursor style of the
// decrement button to change from `default` to `text`.
//
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
//
// 1. Address `appearance` set to `searchfield` in Safari and Chrome.
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome
// (include `-moz` to future-proof).
//
input[type="search"] {
-webkit-appearance: textfield; // 1
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; // 2
box-sizing: content-box;
}
//
// Remove inner padding and search cancel button in Safari and Chrome on OS X.
// Safari (but not Chrome) clips the cancel button when the search input has
// padding (and `textfield` appearance).
//
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
//
// Define consistent border, margin, and padding.
//
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
//
// 1. Correct `color` not being inherited in IE 8/9/10/11.
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
//
legend {
border: 0; // 1
padding: 0; // 2
}
//
// Remove default vertical scrollbar in IE 8/9/10/11.
//
textarea {
overflow: auto;
}
//
// Don't inherit the `font-weight` (applied by a rule above).
// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
//
optgroup {
font-weight: bold;
}
// Tables
// ==========================================================================
//
// Remove most spacing between table cells.
//
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

54
externals/fmt/doc/bootstrap/pager.less vendored Normal file
View File

@ -0,0 +1,54 @@
//
// Pager pagination
// --------------------------------------------------
.pager {
padding-left: 0;
margin: @line-height-computed 0;
list-style: none;
text-align: center;
&:extend(.clearfix all);
li {
display: inline;
> a,
> span {
display: inline-block;
padding: 5px 14px;
background-color: @pager-bg;
border: 1px solid @pager-border;
border-radius: @pager-border-radius;
}
> a:hover,
> a:focus {
text-decoration: none;
background-color: @pager-hover-bg;
}
}
.next {
> a,
> span {
float: right;
}
}
.previous {
> a,
> span {
float: left;
}
}
.disabled {
> a,
> a:hover,
> a:focus,
> span {
color: @pager-disabled-color;
background-color: @pager-bg;
cursor: @cursor-disabled;
}
}
}

View File

@ -0,0 +1,88 @@
//
// Pagination (multiple pages)
// --------------------------------------------------
.pagination {
display: inline-block;
padding-left: 0;
margin: @line-height-computed 0;
border-radius: @border-radius-base;
> li {
display: inline; // Remove list-style and block-level defaults
> a,
> span {
position: relative;
float: left; // Collapse white-space
padding: @padding-base-vertical @padding-base-horizontal;
line-height: @line-height-base;
text-decoration: none;
color: @pagination-color;
background-color: @pagination-bg;
border: 1px solid @pagination-border;
margin-left: -1px;
}
&:first-child {
> a,
> span {
margin-left: 0;
.border-left-radius(@border-radius-base);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius-base);
}
}
}
> li > a,
> li > span {
&:hover,
&:focus {
color: @pagination-hover-color;
background-color: @pagination-hover-bg;
border-color: @pagination-hover-border;
}
}
> .active > a,
> .active > span {
&,
&:hover,
&:focus {
z-index: 2;
color: @pagination-active-color;
background-color: @pagination-active-bg;
border-color: @pagination-active-border;
cursor: default;
}
}
> .disabled {
> span,
> span:hover,
> span:focus,
> a,
> a:hover,
> a:focus {
color: @pagination-disabled-color;
background-color: @pagination-disabled-bg;
border-color: @pagination-disabled-border;
cursor: @cursor-disabled;
}
}
}
// Sizing
// --------------------------------------------------
// Large
.pagination-lg {
.pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
}
// Small
.pagination-sm {
.pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
}

265
externals/fmt/doc/bootstrap/panels.less vendored Normal file
View File

@ -0,0 +1,265 @@
//
// Panels
// --------------------------------------------------
// Base class
.panel {
margin-bottom: @line-height-computed;
background-color: @panel-bg;
border: 1px solid transparent;
border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05));
}
// Panel contents
.panel-body {
padding: @panel-body-padding;
&:extend(.clearfix all);
}
// Optional heading
.panel-heading {
padding: @panel-heading-padding;
border-bottom: 1px solid transparent;
.border-top-radius((@panel-border-radius - 1));
> .dropdown .dropdown-toggle {
color: inherit;
}
}
// Within heading, strip any `h*` tag of its default margins for spacing.
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: ceil((@font-size-base * 1.125));
color: inherit;
> a,
> small,
> .small,
> small > a,
> .small > a {
color: inherit;
}
}
// Optional footer (stays gray in every modifier class)
.panel-footer {
padding: @panel-footer-padding;
background-color: @panel-footer-bg;
border-top: 1px solid @panel-inner-border;
.border-bottom-radius((@panel-border-radius - 1));
}
// List groups in panels
//
// By default, space out list group content from panel headings to account for
// any kind of custom content between the two.
.panel {
> .list-group,
> .panel-collapse > .list-group {
margin-bottom: 0;
.list-group-item {
border-width: 1px 0;
border-radius: 0;
}
// Add border top radius for first one
&:first-child {
.list-group-item:first-child {
border-top: 0;
.border-top-radius((@panel-border-radius - 1));
}
}
// Add border bottom radius for last one
&:last-child {
.list-group-item:last-child {
border-bottom: 0;
.border-bottom-radius((@panel-border-radius - 1));
}
}
}
}
// Collapse space between when there's no additional content.
.panel-heading + .list-group {
.list-group-item:first-child {
border-top-width: 0;
}
}
.list-group + .panel-footer {
border-top-width: 0;
}
// Tables in panels
//
// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
// watch it go full width.
.panel {
> .table,
> .table-responsive > .table,
> .panel-collapse > .table {
margin-bottom: 0;
caption {
padding-left: @panel-body-padding;
padding-right: @panel-body-padding;
}
}
// Add border top radius for first one
> .table:first-child,
> .table-responsive:first-child > .table:first-child {
.border-top-radius((@panel-border-radius - 1));
> thead:first-child,
> tbody:first-child {
> tr:first-child {
border-top-left-radius: (@panel-border-radius - 1);
border-top-right-radius: (@panel-border-radius - 1);
td:first-child,
th:first-child {
border-top-left-radius: (@panel-border-radius - 1);
}
td:last-child,
th:last-child {
border-top-right-radius: (@panel-border-radius - 1);
}
}
}
}
// Add border bottom radius for last one
> .table:last-child,
> .table-responsive:last-child > .table:last-child {
.border-bottom-radius((@panel-border-radius - 1));
> tbody:last-child,
> tfoot:last-child {
> tr:last-child {
border-bottom-left-radius: (@panel-border-radius - 1);
border-bottom-right-radius: (@panel-border-radius - 1);
td:first-child,
th:first-child {
border-bottom-left-radius: (@panel-border-radius - 1);
}
td:last-child,
th:last-child {
border-bottom-right-radius: (@panel-border-radius - 1);
}
}
}
}
> .panel-body + .table,
> .panel-body + .table-responsive,
> .table + .panel-body,
> .table-responsive + .panel-body {
border-top: 1px solid @table-border-color;
}
> .table > tbody:first-child > tr:first-child th,
> .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
> .table-bordered,
> .table-responsive > .table-bordered {
border: 0;
> thead,
> tbody,
> tfoot {
> tr {
> th:first-child,
> td:first-child {
border-left: 0;
}
> th:last-child,
> td:last-child {
border-right: 0;
}
}
}
> thead,
> tbody {
> tr:first-child {
> td,
> th {
border-bottom: 0;
}
}
}
> tbody,
> tfoot {
> tr:last-child {
> td,
> th {
border-bottom: 0;
}
}
}
}
> .table-responsive {
border: 0;
margin-bottom: 0;
}
}
// Collapsable panels (aka, accordion)
//
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
// the help of our collapse JavaScript plugin.
.panel-group {
margin-bottom: @line-height-computed;
// Tighten up margin so it's only between panels
.panel {
margin-bottom: 0;
border-radius: @panel-border-radius;
+ .panel {
margin-top: 5px;
}
}
.panel-heading {
border-bottom: 0;
+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top: 1px solid @panel-inner-border;
}
}
.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {
border-bottom: 1px solid @panel-inner-border;
}
}
}
// Contextual variations
.panel-default {
.panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
}
.panel-primary {
.panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
}
.panel-success {
.panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
}
.panel-info {
.panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
}
.panel-warning {
.panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
}
.panel-danger {
.panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
}

Some files were not shown because too many files have changed in this diff Show More