Skip to content

LDP and STP forwarding #90

@BugraEryilmaz

Description

@BugraEryilmaz

Description
LDP and STP instructions load or store to 2 memory locations. It is normally implemented as two uOps in hardware, but it is a single uOp in flexus. This causes some unintended bugs where store-load forwarding breaks etc.

Steps to Reproduce
Run data caching image with 2 cores
After some time, there will be a sequence of instructions as follows:
str to address x + 8
ldp to address x

Expected Behavior
Load pair should get a part of its value from str because the second load value of the pair address matches the str address.

Actual Behavior
It does not forward because the addresses x and x+8 are not the same.

Solution:
After a lot of back and forth with Yuanlong and Shanqing about solution, we came up with a couple solutions:

  1. We can divide the pair operation into 2 micro ops like a real machine
  2. We can have a single instruction flowing with multiple LSQ entries
  3. We can modify the forwarding checks so that it forwards properly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions