Commit Graph

16 Commits

Author SHA1 Message Date
Aaron Ballman 2ceee2f884 Add -Wno-strict-prototypes to C tests; NFC
This patch adds -Wno-strict-prototypes to all of the test cases that
use functions without prototypes, but not as the primary concern of the
test. e.g., attributes testing whether they can/cannot be applied to a
function without a prototype, etc.

This is done in preparation for enabling -Wstrict-prototypes by
default.
2022-02-24 15:30:30 -05:00
Aaron Ballman adc402bf3d Use functions with prototypes when appropriate; NFC
A significant number of our tests in C accidentally use functions
without prototypes. This patch converts the function signatures to have
a prototype for the situations where the test is not specific to K&R C
declarations. e.g.,

  void func();

becomes

  void func(void);

This is the eleventh batch of tests being updated (there are a
significant number of other tests left to be updated).
2022-02-15 16:06:43 -05:00
Nikita Popov e8b98a5216 [CodeGen] Emit elementtype attributes for indirect inline asm constraints
This implements the clang side of D116531. The elementtype
attribute is added for all indirect constraints (*) and tests are
updated accordingly.

Differential Revision: https://reviews.llvm.org/D116666
2022-01-06 09:29:22 +01:00
Eric Astor 1c545f6dbc [ms] [X86] Use "P" modifier on all branch-target operands in inline X86 assembly.
Summary:
Extend D71677 to apply to all branch-target operands, rather than special-casing call instructions.

Also add a regression test for llvm.org/PR44272, since this finishes fixing it.

Reviewers: thakis, rnk

Reviewed By: thakis

Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D72417
2020-01-09 14:55:03 -05:00
Eric Astor 4a7aa252a3 [X86][AsmParser] re-introduce 'offset' operator
Summary:
Amend MS offset operator implementation, to more closely fit with its MS counterpart:

    1. InlineAsm: evaluate non-local source entities to their (address) location
    2. Provide a mean with which one may acquire the address of an assembly label via MS syntax, rather than yielding a memory reference (i.e. "offset asm_label" and "$asm_label" should be synonymous
    3. address PR32530

Based on http://llvm.org/D37461

Fix broken test where the break appears unrelated.

- Set up appropriate memory-input rewrites for variable references.

- Intel-dialect assembly printing now correctly handles addresses by adding "offset".

- Pass offsets as immediate operands (using "r" constraint for offsets of locals).

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D71436
2019-12-30 14:35:26 -05:00
Coby Tayree cfa3810aa0 Fixups to FE tests affected by D36793
Differential Revision: https://reviews.llvm.org/D36794

llvm-svn: 311640
2017-08-24 08:47:26 +00:00
Reid Kleckner 6d2ea6ec80 [ms-inline-asm] Use the frontend size only for ambiguous instructions
This avoids problems on code like this:
  char buf[16];
  __asm {
    movups xmm0, [buf]
    mov [buf], eax
  }

The frontend size in this case (1) is wrong, and the register makes the
instruction matching unambiguous. There are also enough bytes available
that we shouldn't complain to the user that they are potentially using
an incorrectly sized instruction to access the variable.

Supersedes D32636 and D26586 and fixes PR28266

llvm-svn: 302179
2017-05-04 18:19:52 +00:00
Ehsan Akhgari 0f89fac7a5 Add support for nested blocks in Microsoft inline assembly
This fixes http://llvm.org/PR20204.

llvm-svn: 212389
2014-07-06 05:26:54 +00:00
NAKAMURA Takumi 0acd8a7561 clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/
llvm-svn: 196350
2013-12-04 03:41:33 +00:00
Rafael Espindola ff7cea8c1a Don't pass -O0 to clang_cc1, it is the default.
llvm-svn: 189910
2013-09-04 04:12:25 +00:00
Chad Rosier ea1d1a2d05 [ms-inline asm] Move a few test cases from the 32-bit version to the 64-bit
version as lea is only available in 64-bit mode.

llvm-svn: 179190
2013-04-10 18:08:17 +00:00
Bill Wendling e1c4a1babd Update to use references to attribute groups instead of listing the attributes on the call/invoke instructions.
llvm-svn: 175878
2013-02-22 09:10:20 +00:00
Chad Rosier e3aac2c864 [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-style
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.

llvm-svn: 173186
2013-01-22 19:38:32 +00:00
Chad Rosier c8e56e8931 [driver, ms-inline asm] MS-Style inline assembly is controlled by the
-fasm-blocks flag, not the -fms-extensions flag.
rdar://12808010

llvm-svn: 169422
2012-12-05 21:08:21 +00:00
Chad Rosier 42146d9a06 [ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.

llvm-svn: 166594
2012-10-24 17:23:06 +00:00
Chad Rosier a96da4773c [ms-inline asm] Test case for r166526.
llvm-svn: 166527
2012-10-23 23:42:25 +00:00