8.9.4 builtin_avr_fmul Built-in Function

Inserts a fmul fractional multiplication instruction sequence.

Prototype

unsigned int __builtin_avr_fmul(unsigned char x, unsigned char y)

Remarks

The built-in will produce code that loads the operands to appropriate registers, performs the fractional unsigned multiplication of x and y, and stores the result.

Example

#include <stdint.h>

int main(void) {
  uint16_t result;
  uint8_t a, b;
    
  a = 128;
  b = 3;
  result = __builtin_avr_fmul(a, b);  // result will be assigned 768
}