summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
Diffstat (limited to 'assembler')
-rw-r--r--assembler/gram.y6
-rw-r--r--assembler/main.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/assembler/gram.y b/assembler/gram.y
index 77975e072..79873b222 100644
--- a/assembler/gram.y
+++ b/assembler/gram.y
@@ -216,7 +216,7 @@ brw_program_add_instruction(struct brw_program *p,
{
struct brw_program_instruction *list_entry;
- list_entry = calloc(sizeof(struct brw_program_instruction), 1);
+ list_entry = calloc(1, sizeof(struct brw_program_instruction));
list_entry->type = GEN4ASM_INSTRUCTION_GEN;
list_entry->insn.gen = instruction->insn.gen;
brw_program_append_entry(p, list_entry);
@@ -228,7 +228,7 @@ brw_program_add_relocatable(struct brw_program *p,
{
struct brw_program_instruction *list_entry;
- list_entry = calloc(sizeof(struct brw_program_instruction), 1);
+ list_entry = calloc(1, sizeof(struct brw_program_instruction));
list_entry->type = GEN4ASM_INSTRUCTION_GEN_RELOCATABLE;
list_entry->insn.gen = instruction->insn.gen;
list_entry->reloc = instruction->reloc;
@@ -239,7 +239,7 @@ static void brw_program_add_label(struct brw_program *p, const char *label)
{
struct brw_program_instruction *list_entry;
- list_entry = calloc(sizeof(struct brw_program_instruction), 1);
+ list_entry = calloc(1, sizeof(struct brw_program_instruction));
list_entry->type = GEN4ASM_INSTRUCTION_LABEL;
list_entry->insn.label.name = strdup(label);
brw_program_append_entry(p, list_entry);
diff --git a/assembler/main.c b/assembler/main.c
index 2d39d4536..77cc98b80 100644
--- a/assembler/main.c
+++ b/assembler/main.c
@@ -397,7 +397,7 @@ int main(int argc, char **argv)
if (entry1 && is_label(entry1) && is_entry_point(entry1)) {
// insert NOP instructions until (inst_offset+1) % 4 == 0
while (((inst_offset+1) % 4) != 0) {
- tmp_entry = calloc(sizeof(*tmp_entry), 1);
+ tmp_entry = calloc(1, sizeof(*tmp_entry));
tmp_entry->insn.gen.header.opcode = BRW_OPCODE_NOP;
entry->next = tmp_entry;
tmp_entry->next = entry1;