Cleaning up build warnings.

This commit is contained in:
Ben Vanik
2013-01-29 20:27:24 -08:00
parent 80d74dbe03
commit f117f870fb
7 changed files with 101 additions and 24 deletions

65
TODO.md
View File

@@ -1,24 +1,71 @@
## Loader
Set all function variable addresses to the thunks. Since we handle the thunks
specially the variables are just used as function pointer storage.
## Kernel
NtAllocateVirtualMemory
Ordered:
```
RtlInitializeCriticalSection/RtlInitializeCriticalSectionAndSpinCount
RtlEnterCriticalSection/RtlLeaveCriticalSection
XexCheckExecutablePrivilege
XGetAVPack
ExGetXConfigSetting
KeTlsAlloc
KeTlsSetValue
```
Others:
```
NtQueryVirtualMemory
KeTlsAlloc/KeTlsFree/KeTlsGetValue/KeTlsSetValue
NtWaitForSingleObjectEx
RtlInitUnicodeString/RtlFreeUnicodeString
RtlInitAnsiString/RtlFreeAnsiString
RtlUnicodeStringToAnsiString
RtlCompareMemoryUlong
RtlNtStatusToDosError
RtlRaiseException
NtCreateFile/NtOpenFile
NtReadFile/NtReadFileScatter
NtQueryFullAttributesFile
NtQueryInformationFile/NtSetInformationFile
NtQueryDirectoryFile/NtQueryVolumeInformationFile
NtDuplicateObject
KeBugCheck:
// VOID
// _In_ ULONG BugCheckCode
```
## Instructions
### XER CA bit (carry)
Not sure the way I'm doing this is right. addic/subficx/etc set it to the value
of the overflow bit from the LLVM *_with_overflow intrinsic.
```
rlwimix
rldiclx
```
### XER CA bit (carry)
Not sure the way I'm doing this is right. addic/subficx/etc set it to the value
of the overflow bit from the LLVM *_with_overflow intrinsic.
### Overflow
Overflow bits can be set via the intrinsics:
`llvm.sadd.with.overflow`/etc
It'd be nice to avoid doing this unless absolutely required. The SDB could
walk functions to see if they ever read or branch on the SO bit of things.
### Conditions
Condition bits are, after each function:
```
if (target_reg < 0) { CR0 = b100 | XER[SO] }
@@ -31,9 +78,15 @@ For those, it would be nice to remove redundant sets. Maybe LLVM will do it
automatically due to the local cr? May need to split that up into a few locals
(one for each bit?) to ensure deduping.
### Branch Hinting
`@llvm.expect.i32`/`.i64` could be used with the BH bits in branches to
indicate expected values.
### Data Caching
dcbt and dcbtst could use LLVM intrinsic @llvm.prefetch.
## Codegen
### Calling convention