aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/m68k-asm.c
blob: bfaf2d93ef2d2638a981f4032b283c6873e9f29a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// REQUIRES: m68k-registered-target
// RUN: %clang -target m68k -S %s -o - | FileCheck %s

// Test special escaped character in inline assembly
void escaped() {
  // '.' -> '.'
  // CHECK: move.l #66, %d1
  __asm__ ("move%.l #66, %%d1" ::);
  // '#' -> '#'
  // CHECK: move.l #66, %d1
  __asm__ ("move.l %#66, %%d1" ::);
  // '/' -> '%'
  // CHECK: move.l #66, %d1
  __asm__ ("move.l #66, %/d1" ::);
  // '$' -> 's'
  // CHECK: muls %d0, %d1
  __asm__ ("mul%$ %%d0, %%d1" ::);
  // '&' -> 'd'
  // CHECK: move.l %d0, %d1
  __asm__ ("move.l %%%&0, %%d1" ::);
}