switch (Kind) {
case AVRMCExpr::VK_AVR_LO8:
+ Value &= 0xff;
break;
case AVRMCExpr::VK_AVR_HI8:
Value &= 0xff00;
Value >>= 24;
break;
case AVRMCExpr::VK_AVR_PM_LO8:
+ case AVRMCExpr::VK_AVR_LO8_GS:
+ Value >>= 1; // Program memory addresses must always be shifted by one.
Value &= 0xff;
- Value >>= 1;
break;
case AVRMCExpr::VK_AVR_PM_HI8:
+ case AVRMCExpr::VK_AVR_HI8_GS:
+ Value >>= 1; // Program memory addresses must always be shifted by one.
Value &= 0xff00;
- Value >>= 9;
+ Value >>= 8;
break;
case AVRMCExpr::VK_AVR_PM_HH8:
+ Value >>= 1; // Program memory addresses must always be shifted by one.
Value &= 0xff0000;
- Value >>= 17;
- break;
- case AVRMCExpr::VK_AVR_LO8_GS:
- Value &= 0xff;
- Value >>= 1;
- break;
- case AVRMCExpr::VK_AVR_HI8_GS:
- Value &= 0xff00;
- Value >>= 9;
+ Value >>= 16;
break;
case AVRMCExpr::VK_AVR_GS:
- Value >>= 1;
+ Value >>= 1; // Program memory addresses must always be shifted by one.
break;
case AVRMCExpr::VK_AVR_None: