Displaying 20 results from an estimated 21 matches for "getexceptioncode".
2012 Sep 17
2
[LLVMdev] Detail question about how to implement Win64 SEH
...!
I try to add more functionality to Win64 exception handling, based on
the posted patches from Charles Davis and João Matos.
But I have a question about how to map SEH handling to LLVM IR.
The basic structure of SEH in C is as follows:
__try {
// Do something.
}
__except (filter(GetExceptionCode(), GetExceptionInformation()))
{
// Handle exception
}
How to translate this?
- The filter expression is basically a nested function which is called
with the exception code and exception information.
- The body of the __except statement is the landing pad. It is always
executed if th...
2013 May 23
2
ASM runtime detection and optimizations
...HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "armcpu.h"
+
+#if !defined(ARM_ASM) || \
+ !defined(ARMv5E_ASM) && !defined(ARMv6_ASM) && \
+ !defined(ARM_HAVE_NEON)
+opus_uint32 opus_cpu_capa(void)
+{
+ return 0;
+}
+#elif defined(_MSC_VER)
+/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/
+# define WIN32_LEAN_AND_MEAN
+# define WIN32_EXTRA_LEAN
+# include <windows.h>
+
+opus_uint32 opus_cpu_capa(void){
+ opus_uint32 flags;
+ flags=0;
+ /*MSVC has no inline __asm support for ARM, but it does let you __emit
+ * instructions via th...
2012 Sep 17
0
[LLVMdev] Detail question about how to implement Win64 SEH
...? I.e. are you talking about
how to implement LLVM's "dwarf" exception handling intrinsics and landingpad
instruction using SEH?
Ciao, Duncan.
>
> The basic structure of SEH in C is as follows:
>
> __try {
> // Do something.
> }
> __except (filter(GetExceptionCode(), GetExceptionInformation()))
> {
> // Handle exception
> }
>
> How to translate this?
>
> - The filter expression is basically a nested function which is called with the
> exception code and exception information.
> - The body of the __except statement is the...
2014 Nov 10
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...nter as an operand. However, in the short term, I think we can
> model this by always catching the exception and then re-raising it.
> Obviously, this isn't 100% faithful, but it can work.
>
> ---
>
> Here’s some example IR for how we might lower this C code:
>
> #define GetExceptionCode() _exception_code()
> enum { EXCEPTION_INT_DIVIDE_BY_ZERO = 0xC0000094 };
> int safe_div(int n, int d) {
> int r;
> __try {
> r = n / d;
> } __except(GetExceptionCode() == EXCEPTION_INT_DIVIDE_BY_ZERO) {
> r = 0;
> }
> return r;
> }
>
> define i...
2011 Jun 12
5
[LLVMdev] Is LLVM expressive enough to represent asynchronous exceptions?
...ilter(int code,int*p) {
printf("code: %x, p: %x\n",code,p);
*p = 10;
return EXCEPTION_EXECUTE_HANDLER;
}
void whatever() {
int p = 5;
__try {
printf("p: %d\n",p);
p /= 0; // SEH
printf("unreachable\n");
}
__except( filter(GetExceptionCode(),&p) ) {
printf("p: %d\n",p);
}
}
The output of calling whatever() is:
p: 5 <-- in __try block
code: c0000094, p: 1af8d0 <-- in filter function
p: 10 <-- handler (notice value of p changed)
To summarize:
* Exception...
2015 Dec 23
6
[AArch64 neon intrinsics v4 0/5] Rework Neon intrinsic code for Aarch64 patchset
Following Tim's comments, here are my reworked patches for the Neon intrinsic function patches of
of my Aarch64 patchset, i.e. replacing patches 5-8 of the v2 series. Patches 1-4 and 9-18 of the
old series still apply unmodified.
The one new (as opposed to changed) patch is the first one in this series, to add named constants
for the ARM architecture variants.
There are also some minor code
2011 Jun 12
0
[LLVMdev] Is LLVM expressive enough to represent asynchronous exceptions?
...p);
> *p = 10;
> return EXCEPTION_EXECUTE_HANDLER;
> }
>
> void whatever() {
> int p = 5;
> __try {
> printf("p: %d\n",p);
> p /= 0; // SEH
> printf("unreachable\n");
> }
> __except( filter(GetExceptionCode(),&p) ) {
> printf("p: %d\n",p);
> }
> }
>
> The output of calling whatever() is:
>
> p: 5<-- in __try block
> code: c0000094, p: 1af8d0<-- in filter function
> p: 10<-- handler (notice value of p changed)
>
> To summarize:
>...
2009 Jan 27
3
[LLVMdev] [PATCH] llvm/llvm-gcc broken on mingw32
...= internal::GetUnitTestImpl();
-#ifdef GTEST_OS_WINDOWS
+#if defined(GTEST_OS_WINDOWS) && !defined(__MINGW__) && !defined(__MINGW32__)
// We are on Windows.
impl->os_stack_trace_getter()->UponLeavingGTest();
__try {
@@ -2025,7 +2025,7 @@
AddExceptionThrownFailure(GetExceptionCode(), "TearDown()");
}
-#else // We are on Linux or Mac - exceptions are disabled.
+#else // We are on Linux, Mac or MingW - exceptions are disabled.
impl->os_stack_trace_getter()->UponLeavingGTest();
SetUp();
@@ -2227,7 +2227,7 @@
const TimeInMillis start = GetTimeIn...
2014 Nov 13
2
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...landing pad could take a function pointer as an operand. However, in the short term, I think we can model this by always catching the exception and then re-raising it. Obviously, this isn't 100% faithful, but it can work.
---
Here’s some example IR for how we might lower this C code:
#define GetExceptionCode() _exception_code()
enum { EXCEPTION_INT_DIVIDE_BY_ZERO = 0xC0000094 };
int safe_div(int n, int d) {
int r;
__try {
r = n / d;
} __except(GetExceptionCode() == EXCEPTION_INT_DIVIDE_BY_ZERO) {
r = 0;
}
return r;
}
define internal void @try_body(i32* %r, i32* %n, i32* %d) {
entry:...
2020 May 08
0
Wine release 5.8
...Use __ASM_USE_THISCALL_WRAPPER macro.
msvcp: Use __ASM_USE_THISCALL_WRAPPER macro.
msvcrt: Use __ASM_USE_THISCALL_WRAPPER macro.
riched20/tests: Don't use thiscall wrappers on clang MSVC target.
riched20: Use __ASM_USE_THISCALL_WRAPPER macro.
rpcrt4: Don't use GetExceptionCode outside __except block.
server: Don't try to synchronize system registers on not initialized threads in get_thread_context request.
server: Delay setting system registers until suspending select is waken.
winbase.h: Support using int for LONG in MSVC interlocked functions....
2008 Feb 22
0
Wine release 0.9.56
...ninet: Fix an off-by-one error in the boundary checks in HTTP_DecodeBase64.
wininet: Fix the return value check of SHGetSpecialFolderPathW in URLCacheContainers_CreateDefaults.
urlmon: Check the return value of ReadFile and return INET_E_DOWNLOAD_FAILURE is it fails.
Don't use GetExceptionCode and GetExceptionInformation in exception filter functions.
user32: Fix MonitorFromRect to cope with the absence of the MONITOR_DEFAULTTONEAREST flag.
Add a new convenience macro for an exception handler that handles all exceptions.
include: Fix the C_ASSERT macro to not generate a...
2009 Feb 13
0
Wine release 1.1.15
...h for the as/ld/nm tools in the PATH under various names.
winegcc: Pass the -m32/-m64 options to winebuild too.
fonts: Copy the TrueType fonts to the build directory for out-of-tree builds.
Fix position of CDECL qualifier for functions that return pointers.
widl: Avoid using GetExceptionCode outside of an exception handler.
widl: Add a dummy reference to the filter function to avoid a warning.
widl: Replace unsigned long and size_t by unsigned int where appropriate.
widl: Add printf format attribute on all printf-like functions and fix resulting warnings.
widl:...
2008 Mar 07
0
Wine release 0.9.57
...et to close sockets and define it to close on Unix platforms to make the code more portable.
mshtml: Move some public GUIDs to shlguid.h.
user32: Add test for calling CreateDesktop on already created desktop name.
uuid: Add CLSID_InProcFreeMarshaler.
include: Add defines for GetExceptionCode, GetExceptionInformation and AbnormalTermination to excpt.h for the MS compiler when using compiler exceptions.
adsiid: Add static import library for active directory GUIDs.
Roderick Colenbrander (10):
wined3d: Request alpha in backbuffer mode, to work correctly with multiple opengl pi...
2015 Mar 13
1
[RFC PATCH v3] Intrinsics/RTCD related fixes. Mostly x86.
...OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
endif
diff --git a/celt/arm/armcpu.c b/celt/arm/armcpu.c
index 1768525..5e5d10c 100644
--- a/celt/arm/armcpu.c
+++ b/celt/arm/armcpu.c
@@ -73,7 +73,7 @@ static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){
__except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){
/*Ignore exception.*/
}
-# if defined(OPUS_ARM_MAY_HAVE_NEON)
+# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
__try{
/*VORR q0,q0,q0*/
__emit(0xF2200150);
@@ -107,7 +107,7 @@ opus_uint32 opus_cpu_capabilities(...
2015 Mar 12
1
[RFC PATCHv2] Intrinsics/RTCD related fixes. Mostly x86.
...OPT_UNIT_TEST_OBJ): CFLAGS += $(OPUS_ARM_NEON_INTR_CFLAGS) $(NE10_CFLAGS)
endif
diff --git a/celt/arm/armcpu.c b/celt/arm/armcpu.c
index 1768525..5e5d10c 100644
--- a/celt/arm/armcpu.c
+++ b/celt/arm/armcpu.c
@@ -73,7 +73,7 @@ static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){
__except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){
/*Ignore exception.*/
}
-# if defined(OPUS_ARM_MAY_HAVE_NEON)
+# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
__try{
/*VORR q0,q0,q0*/
__emit(0xF2200150);
@@ -107,7 +107,7 @@ opus_uint32 opus_cpu_capabilities(...
2015 Mar 02
13
Patch cleaning up Opus x86 intrinsics configury
The attached patch cleans up Opus's x86 intrinsics configury.
It:
* Makes ?enable-intrinsics work with clang and other non-GCC compilers
* Enables RTCD for the floating-point-mode SSE code in Celt.
* Disables use of RTCD in cases where the compiler targets an instruction set by default.
* Enables the SSE4.1 Silk optimizations that apply to the common parts of Silk when Opus is built in
2015 Mar 18
5
[RFC PATCH v1 0/4] Enable aarch64 intrinsics/Ne10
Hi All,
Since I continue to base my work on top of Jonathan's patch,
and my previous Ne10 fft/ifft/mdct_forward/backward patches,
I thought it would be better to just post all new patches
as a patch series. Please let me know if anyone disagrees
with this approach.
You can see wip branch of all latest patches at
https://git.linaro.org/people/viswanath.puttagunta/opus.git
Branch:
2015 Mar 31
6
[RFC PATCH v1 0/5] aarch64: celt_pitch_xcorr: Fixed point series
Hi Timothy,
As I mentioned earlier [1], I now fixed compile issues
with fixed point and resubmitting the patch.
I also have new patch that does intrinsics optimizations
for celt_pitch_xcorr targetting aarch64.
You can find my latest work-in-progress branch at [2]
For reference, you can use the Ne10 pre-built libraries
at [3]
Note that I am working with Phil at ARM to get my patch at [4]
2015 May 08
8
[RFC PATCH v2]: Ne10 fft fixed and previous 0/8]
Hi All,
As per Timothy's suggestion, disabling mdct_forward
for fixed point. Only effects
armv7,armv8: Extend fixed fft NE10 optimizations to mdct
Rest of patches are same as in [1]
For reference, latest wip code for opus is at [2]
Still working with NE10 team at ARM to get corner cases of
mdct_forward. Will update with another patch
when issue in NE10 gets fixed.
Regards,
Vish
[1]:
2015 May 15
11
[RFC V3 0/8] Ne10 fft fixed and previous
Hi All,
Changes from RFC v2 [1]
armv7,armv8: Extend fixed fft NE10 optimizations to mdct
- Overflow issue fixed by Phil at ARM. Ne10 wip at [2]. Should be upstream soon.
- So, re-enabled using fixed fft for mdct_forward which was disabled in RFCv2
armv7,armv8: Optimize fixed point fft using NE10 library
- Thanks to Jonathan Lennox, fixed some build fixes on iOS and some copy-paste errors
Rest