Pelles C forum

C language => Beginner questions => Topic started by: Jokaste on October 30, 2017, 06:25:07 PM

Title: Fcml error
Post by: Jokaste on October 30, 2017, 06:25:07 PM
Code: [Select]

/* All currently supported encoding phases. */
fcml_ien_asm_part_processor_phase fcml_iarr_asm_executed_phases[] = { FCML_IEN_ASM_IPPP_FIRST_PHASE, FCML_IEN_ASM_IPPP_SECOND_PHASE,
        FCML_IEN_ASM_IPPP_THIRD_PHASE };


fcml_nuint8_t fcml_ifn_asm_calculate_instruction_parts_length( fcml_ist_asm_instruction_part *instruction_part, fcml_int parts_num ) {
    fcml_nuint8_t length = { 0, FCML_TRUE };
    while ( parts_num-- > 0 ) {
        length.value += instruction_part++->code_length;
    }
    return length;
}
Quote
error #3114: [asm] Invalid combination of opcode and operands.


What is that kind of error in a C compiler?
Title: Re: Fcml error
Post by: frankie on October 31, 2017, 02:13:22 PM
Is an internal compiler error.
Means that the code generation algorithm is a little bit lazy, generating inconsistent instructions. In this specific case an operation that try to use registers that are not allowed with the opcode.
Or a bug in the assembler that doesn't recognize a legal opcode.
Title: Re: Fcml error
Post by: Jokaste on October 31, 2017, 02:51:19 PM
I have to find fcml binaries...
Thanks for the answer.
Will this bug be corrected one day?

Title: Re: Fcml error
Post by: frankie on October 31, 2017, 06:26:40 PM
Try to break the line:
Code: [Select]
length.value += instruction_part++->code_length;
to
Code: [Select]
length.value += instruction_part->code_length;
instruction_part++;
It should remove the error.