Skip to content

Commit d2b88e2

Browse files
committed
---
yaml --- r: 138943 b: refs/heads/try2 c: fc78b93 h: refs/heads/master i: 138941: cde0dc1 138939: bfc1fd7 138935: da0d66a 138927: f9f5933 138911: adf739b 138879: 5a7c234 v: v3
1 parent f54d9b5 commit d2b88e2

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ecccc0d649088720a8c4af86e1722b9a26ca31dc
8+
refs/heads/try2: fc78b93c413e53a43ec568e3ec1d74d35924093b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/lib/llvm.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ pub enum Metadata {
188188
MD_tbaa_struct = 5
189189
}
190190

191+
// Inline Asm Dialect
192+
pub enum AsmDialect {
193+
AD_ATT = 0,
194+
AD_Intel = 1
195+
}
196+
191197
// Opaque pointer types
192198
pub enum Module_opaque {}
193199
pub type ModuleRef = *Module_opaque;
@@ -217,9 +223,9 @@ pub enum SectionIterator_opaque {}
217223
pub type SectionIteratorRef = *SectionIterator_opaque;
218224

219225
pub mod llvm {
220-
use super::{AtomicBinOp, AtomicOrdering, BasicBlockRef, Bool, BuilderRef};
221-
use super::{ContextRef, MemoryBufferRef, ModuleRef, ObjectFileRef};
222-
use super::{Opcode, PassManagerRef, PassManagerBuilderRef};
226+
use super::{AsmDialect, AtomicBinOp, AtomicOrdering, BasicBlockRef};
227+
use super::{Bool, BuilderRef, ContextRef, MemoryBufferRef, ModuleRef};
228+
use super::{ObjectFileRef, Opcode, PassManagerRef, PassManagerBuilderRef};
223229
use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
224230
use super::{ValueRef};
225231

@@ -1437,7 +1443,8 @@ pub mod llvm {
14371443
/** Prepares inline assembly. */
14381444
pub unsafe fn LLVMInlineAsm(Ty: TypeRef, AsmString: *c_char,
14391445
Constraints: *c_char, SideEffects: Bool,
1440-
AlignStack: Bool) -> ValueRef;
1446+
AlignStack: Bool, Dialect: AsmDialect)
1447+
-> ValueRef;
14411448
}
14421449
}
14431450

branches/try2/src/librustc/middle/trans/build.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use lib::llvm::llvm;
12-
use lib::llvm::{CallConv, TypeKind, AtomicBinOp, AtomicOrdering};
12+
use lib::llvm::{CallConv, TypeKind, AtomicBinOp, AtomicOrdering, AsmDialect};
1313
use lib::llvm::{Opcode, IntPredicate, RealPredicate, True, False};
1414
use lib::llvm::{ValueRef, TypeRef, BasicBlockRef, BuilderRef, ModuleRef};
1515
use lib;
@@ -872,12 +872,13 @@ pub fn add_comment(bcx: block, text: &str) {
872872
}
873873
}
874874
875-
pub fn InlineAsmCall(cx: block, asm: *c_char, cons: *c_char) -> ValueRef {
875+
pub fn InlineAsmCall(cx: block, asm: *c_char, cons: *c_char,
876+
dia: AsmDialect) -> ValueRef {
876877
unsafe {
877878
count_insn(cx, "inlineasm");
878879
879880
let llfty = T_fn(~[], T_void());
880-
let v = llvm::LLVMInlineAsm(llfty, asm, cons, False, False);
881+
let v = llvm::LLVMInlineAsm(llfty, asm, cons, False, False, dia);
881882
882883
Call(cx, v, ~[])
883884
}

branches/try2/src/librustc/middle/trans/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ fn trans_rvalue_dps_unadjusted(bcx: block, expr: @ast::expr,
694694
ast::expr_inline_asm(asm, cons) => {
695695
do str::as_c_str(*asm) |a| {
696696
do str::as_c_str(*cons) |c| {
697-
InlineAsmCall(bcx, a, c);
697+
InlineAsmCall(bcx, a, c, lib::llvm::AD_ATT);
698698
}
699699
}
700700
return bcx;

branches/try2/src/rustllvm/RustWrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ extern "C" LLVMValueRef LLVMInlineAsm(LLVMTypeRef Ty,
545545
char *AsmString,
546546
char *Constraints,
547547
LLVMBool HasSideEffects,
548-
LLVMBool IsAlignStack) {
548+
LLVMBool IsAlignStack,
549+
InlineAsm::AsmDialect Dialect) {
549550
return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), AsmString,
550551
Constraints, HasSideEffects,
551-
IsAlignStack));
552-
// IsAlignStack, InlineAsm::AD_Intel));
552+
IsAlignStack, Dialect));
553553
}

0 commit comments

Comments
 (0)