diff --git a/modcc/backends/avx512.hpp b/modcc/backends/avx512.hpp
index 153e329e1c25ebc331b695d0212e57267d013ad0..cce0bc88998bb6abd50f8cce927bf0eb1874f448 100644
--- a/modcc/backends/avx512.hpp
+++ b/modcc/backends/avx512.hpp
@@ -121,7 +121,7 @@ struct simd_intrinsics<targetKind::avx512> {
     static void emit_gather(TextBuffer& tb, const A& addr,
                             const I& index, const S& scale) {
         tb << "_mm512_i32gather_pd(";
-        emit_operands(tb, arg_emitter(addr), arg_emitter(index),
+        emit_operands(tb, arg_emitter(index), arg_emitter(addr),
                       arg_emitter(scale));
         tb << ")";
     }
diff --git a/modcc/options.hpp b/modcc/options.hpp
index 1ca12eea929469a1e0d9d5189ff6c8b3d54298a4..02c2f6fd4bf817d473291eff90483fc0ca53cf65 100644
--- a/modcc/options.hpp
+++ b/modcc/options.hpp
@@ -7,7 +7,7 @@ enum class targetKind {
     cpu,
     gpu,
     // Vectorisation targets
-    avx512,
+    avx512
  };
 
 struct Options {
diff --git a/modcc/simd_printer.hpp b/modcc/simd_printer.hpp
index 4c9efe965db9230924815be2afe6c2474dc11aa6..668c89bc4e82bff15b458c73b7a2e1f1634670cd 100644
--- a/modcc/simd_printer.hpp
+++ b/modcc/simd_printer.hpp
@@ -377,7 +377,7 @@ void SimdPrinter<Arch>::visit(IndexedVariable *e) {
         value_name = emit_rawptr_name(e->index_name());
     }
 
-    simd_backend::emit_gather(text_, vindex_name, value_name, "sizeof(value_type)");
+    simd_backend::emit_gather(text_, value_name, vindex_name, "sizeof(value_type)");
 }
 
 template<targetKind Arch>