Peter Goodman

Results 339 comments of Peter Goodman

I strongly believe linking should be a process that queries an API to get answers about how to proceed, and should not bake in specific mechanics. So, for example, if...

`` is a [synthetic input file](https://github.com/trailofbits/pasta/blob/master/lib/Compile/Run.cpp#L357) that clang's parser operates on. PASTA first runs an instrumented preprocessor on the input, and in the process of this, forms ``, which is...

Okay this is a bug in one of our [patches](https://github.com/lifting-bits/cxx-common/blob/master/ports/llvm-16/0030-UnknownAttrsAsAnnotate-and-AttributedType-Attrs.patch): `HandleUnkownTypeAttrAsAnnotateTypeAttr`. We've made this patch with the intent of implicitly converting things like `__attribute__((hello_world("a")))` into `__attribute__((annotate("hello_world", "a")))`, though there are...

The missing builtin looks to be a GCC-specific intrinsic that Clang doesn't seem to have. There are a number of others that are related, and could be harvested from this...

Oh I'm a dummy. I shouldn't have wrapped all those builtin names with double quotes. Can you try with this? ``` TARGET_BUILTIN(__builtin_ia32_comieq, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comineq, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comilt,...

Try this? ``` TARGET_BUILTIN(__builtin_ia32_comieq, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comineq, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comilt, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comile, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comigt, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_comige, "iV4fV4f", "", "sse") TARGET_BUILTIN(__builtin_ia32_ucomieq, "iV4fV4f", "",...

Getting closer :-) Seems like we're missing that intrinsic too.

Oh I'm making a script for this! I'll be bulk grabbing them from CBMC, which has a lot of forward declarations. It turns out there is some other stuff in...

My in-progress work is in [this branch](https://github.com/trailofbits/pasta/tree/token_context_refactor/bin/BootstrapBuiltins).

Here's what I mean from taking the declarations from [CBMC](https://github.com/diepbp/SlicingCBMC/blob/master/ansi-c/gcc_builtin_headers_ia32.h). The idea is to auto-generate the `TARGET_BUILTIN` macros from the declarations in a few of these header files.