SHANGHAI, China — Defending champion Roger Federer extended his mastery of Andy Roddick, winning 6-4, 6-2 Friday at the Masters Cup in a match played largely for pride.

Both players already earned semifinal berths from the Red Group after the fourth-ranked Nikolay Davydenko beat No. 7 Fernando Gonzalez 6-4, 6-3. The match determined who they will face next in the year-end tournament featuring the top eight players.

Top-ranked Federer, who improved his record against Roddick to 15-1, will play second-ranked Rafael Nadal on Saturday, while No. 5 Roddick meets No. 6 David Ferrer, who went undefeated in the Gold Group.

"It seems like most times we play, he's on top of his game, which is a little annoying," Roddick said. "I guess I just have to figure out what about my game brings out the best in him and try to adjust."

The match was nearly a repeat of the Australian Open semifinals when Federer blitzed Roddick, allowing the American only six games in three sets. Because he already had clinched his semifinal place by winning his first two matches, Roddick said he had no pressure and hoped he could cut into Federer's advantage.

No chance.

Federer, who lost his opening match against Gonzalez, was thoroughly dominant. He never faced a break point and blunted Roddick's powerful first serve and picked on his second serve. The Swiss star finished with 33 winners to only 13 unforced errors.

"Andy has been trying many, many different things out against me," Federer said. "It's dangerous for me to play against him, especially with the guy having such a big serve. Today I read it well."

Clearly frustrated, Roddick smashed a ball into the stands after losing the first set, then broke his racket by bashing it against his left foot five times when Federer broke him for a 3-0 lead in the second set.

Serving at 5-2, Federer held at love, whacking a clean forehand winner to finish it in 61 minutes.

"You see some of the guys who beat him are quick," Roddick said. "Unfortunately, that's not my strength. You kind of have to go with what you're good at, try to make adjustments."

Davydenko already had been eliminated from the semifinals by dropping his first two matches. While inconsistent again, the Russian knocked out Gonzalez, who had hoped to emerge from the Red Group if he won and top-ranked Federer lost.

Davydenko's victory gives him a little confidence after his earlier losses. Now he's looking forward to a couple of days in the sun in the Maldives before starting preparations for Russia's Davis Cup final against the United States.

"I try mentally to recover and to be a little bit brown," Davydenko said. "And then it's my happy face coming to Davis Cup final."

Davydenko essentially won a battle of attrition against Gonzalez, who was at the top of his game in beating Federer and then showed his well-known inconsistency by losing his last two matches.

Davydenko was hit or miss throughout the match, with 33 winners offset by 35 unforced errors. Uncharacteristically, he frequently charged the net, where he either hit a deft volley or was passed.

But Gonzalez was more uneven, and his stinging forehand let him down. He smacked a clean winner around the net post for one of only seven forehand winners to 17 unforced errors.

His frustration boiled over when he netted a forehand on break point while serving at 4-5 to concede the first set to Davydenko. His received a code violation after smashing his racket on the court, then bashing the net post as he walked back to his chair.

"I was a little bit disappointed with myself after losing that set," Gonzalez said. "I give everything that I have. I was running a lot. I was playing good tennis, but it wasn't feeling like I want."

Davydenko got the final break he needed on his 15th break point of the match as Gonzalez served at 3-4. The Russian then held serve, hitting a clean volley winner on match point.